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

ci: add ability to dry-run release #802

Merged
Merged
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
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Release
on:
release:
types: [published]
workflow_dispatch:

jobs:
set-version:
Expand All @@ -13,12 +14,14 @@ jobs:
- name: Export tag
id: vars
run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
if: ${{ github.event_name == 'release' }}

- name: Update project version
run: |
sed -i "s/^version = \".*\"/version = \"$RELEASE_VERSION\"/" pyproject.toml
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
if: ${{ github.event_name == 'release' }}

- name: Upload updated pyproject.toml
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -155,6 +158,7 @@ jobs:
name: Publish
runs-on: ubuntu-22.04
needs: [linux, windows, macos, sdist]
if: ${{ github.event_name == 'release' }}
steps:
- uses: actions/download-artifact@v4

Expand All @@ -169,6 +173,7 @@ jobs:
check-docs:
runs-on: ubuntu-24.04
needs: publish
if: ${{ github.event_name == 'release' }}
steps:
- name: Check out
uses: actions/checkout@v4
Expand Down
Loading