From aff47b254c967cda6b5debb24ea00ed76440bf9c Mon Sep 17 00:00:00 2001 From: Ivan Murabito <36967518+CuriousDolphin@users.noreply.github.com> Date: Thu, 28 Nov 2024 17:34:39 +0100 Subject: [PATCH 1/2] add checkout before creating a release --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9586d47..3bf646e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,11 +27,12 @@ jobs: branch: main file_pattern: pyproject.toml add_options: --update - - name: get next version without tagging + - name: get next version with tagging id: tag_version uses: mathieudutour/github-tag-action@v6.2 with: github_token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v2 - name: Create a GitHub release uses: ncipollo/release-action@v1 with: From 28d6bfa9befed1bb061259c5b227c76cba79bf20 Mon Sep 17 00:00:00 2001 From: Ivan Murabito <36967518+CuriousDolphin@users.noreply.github.com> Date: Thu, 28 Nov 2024 17:51:00 +0100 Subject: [PATCH 2/2] fix release pipeline --- .github/workflows/release.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3bf646e..20b5a72 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,19 +20,20 @@ jobs: - name: Update pyproject.toml with new version tag run: | sed -i 's/version = ".*"/version = "${{ steps.get_next_version.outputs.new_version }}"/' pyproject.toml - - name: Update project version + - name: Update project version and commit uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "[bot]: update version to ${{ steps.get_next_version.outputs.new_version }}" branch: main file_pattern: pyproject.toml add_options: --update - - name: get next version with tagging + tagging_message: '${{ steps.get_next_version.outputs.new_tag }}' + - name: Tag version id: tag_version uses: mathieudutour/github-tag-action@v6.2 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v2 + github_token: ${{ secrets.GITHUB_TOKEN }} + dry_run: false - name: Create a GitHub release uses: ncipollo/release-action@v1 with: