From e4e1c96bbac6c2193a982c4b0bf8d22f9e54feaf Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Sat, 10 Aug 2024 02:08:49 +0200 Subject: [PATCH] ci: add ability to dry-run release (#802) --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a889633d..e23d0c0d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,7 @@ name: Release on: release: types: [published] + workflow_dispatch: jobs: set-version: @@ -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 @@ -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 @@ -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