Skip to content

Commit

Permalink
ci: add ability to dry-run release (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkniewallner authored Aug 10, 2024
1 parent fc98954 commit e4e1c96
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit e4e1c96

Please sign in to comment.