Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable concurrency for build workflow #7

Merged
merged 7 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on:
branches:
- master
pull_request:
# don't rebuild when only modifying other workflows
paths:
- '!.github/workflows/**'
- '.github/workflows/build.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-wheels:
Expand Down Expand Up @@ -62,9 +62,11 @@ jobs:
submodules: recursive

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- run: |
python -m pip install --upgrade pip
- name: Build source distribution
run: |
pip install build
python -m build --sdist

Expand All @@ -74,27 +76,28 @@ jobs:

check:
name: All wheels built successfully
if: success() || failure()
if: always()
needs:
- build-wheels
runs-on: ubuntu-latest

steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
- name: Check build matrix status
if: failure() || cancelled()
run: exit 1

publish:
name: Publish package distributions to PyPI
name: Publish package
runs-on: ubuntu-latest
needs: [build-wheels, build-sdist]
needs:
- build-wheels
- build-sdist
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- name: Download artifact
id: download-artifact
- id: download-artifact
uses: actions/download-artifact@v3
with:
name: artifact
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pypi.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on: workflow_dispatch

jobs:
pypi-publish:
name: Upload release to PyPI
name: Publish package to TestPyPI
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- name: Download artifact
- name: Download build artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v2
with:
Expand All @@ -19,7 +19,7 @@ jobs:
path: dist
name: artifact

- name: Publish package distributions to PyPI
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
9 changes: 6 additions & 3 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
with:
submodules: recursive

- id: new-version
- name: Retrieve new version number
id: new-version
run: |
echo "version=$(python setup.py --version)" >> "$GITHUB_OUTPUT"

Expand All @@ -27,11 +28,13 @@ jobs:
submodules: recursive
ref: ${{ github.base_ref }}

- id: target-version
- name: Retrieve target branch version number
id: target-version
run: |
echo "version=$(python setup.py --version)" >> "$GITHUB_OUTPUT"

- env:
- name: Compare version numbers
env:
NEW_VERSION: ${{ steps.new-version.outputs.version }}
TARGET_VERSION: ${{ steps.target-version.outputs.version }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "vibrio"
version = "0.1.2"
version = "0.1.3"
readme = "README.md"
requires-python = ">=3.9"
license = { file = "LICENSE" }
Expand Down
Loading