From dad26e3ec9df4aef76e94b19861625c6a8372687 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 16:14:56 +0000 Subject: [PATCH 1/5] Initial plan From 6f5ca0b23d3375cf58c1be5320dca2ae399c9985 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 16:16:46 +0000 Subject: [PATCH 2/5] Add workflow_dispatch trigger to release.yml for manual execution Co-authored-by: Luxotick <76044365+Luxotick@users.noreply.github.com> --- .github/workflows/release.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 463e2e7..ccafa9f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,12 @@ on: push: tags: - 'v*' + workflow_dispatch: + inputs: + version: + description: 'Version to release (e.g., v0.1.0)' + required: true + default: 'v0.1.0' env: CARGO_TERM_COLOR: always @@ -15,14 +21,22 @@ jobs: outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} steps: + - name: Set version from tag + if: github.event_name == 'push' + run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + + - name: Set version from input + if: github.event_name == 'workflow_dispatch' + run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV + - name: Create Release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + tag_name: ${{ env.VERSION }} + release_name: Release ${{ env.VERSION }} draft: false prerelease: false From e7f7668a104c408b6a0c450c464c4f028b40090d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 16:17:31 +0000 Subject: [PATCH 3/5] Fix workflow to create tags for manual triggers and improve conditions Co-authored-by: Luxotick <76044365+Luxotick@users.noreply.github.com> --- .github/workflows/release.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ccafa9f..1d948a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,14 +21,25 @@ jobs: outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set version from tag - if: github.event_name == 'push' + if: startsWith(github.ref, 'refs/tags/') run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - name: Set version from input if: github.event_name == 'workflow_dispatch' run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV + - name: Create tag for manual release + if: github.event_name == 'workflow_dispatch' + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git tag -a "${{ github.event.inputs.version }}" -m "Release ${{ github.event.inputs.version }}" + git push origin "${{ github.event.inputs.version }}" + - name: Create Release id: create_release uses: actions/create-release@v1 From b69c4b6c507d235d94f5d5d9c6d173d841d1a3a3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 16:18:10 +0000 Subject: [PATCH 4/5] Add tag existence check and fetch all tags on checkout Co-authored-by: Luxotick <76044365+Luxotick@users.noreply.github.com> --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1d948a3..31670d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Set version from tag if: startsWith(github.ref, 'refs/tags/') @@ -37,6 +39,10 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" + if git rev-parse "${{ github.event.inputs.version }}" >/dev/null 2>&1; then + echo "Tag ${{ github.event.inputs.version }} already exists!" + exit 1 + fi git tag -a "${{ github.event.inputs.version }}" -m "Release ${{ github.event.inputs.version }}" git push origin "${{ github.event.inputs.version }}" From 55629c5be1300e322e8cd4d25ddd69757656c4a3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 16:18:42 +0000 Subject: [PATCH 5/5] Improve tag existence check to only match tags, not branches or commits Co-authored-by: Luxotick <76044365+Luxotick@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31670d7..eaf53d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - if git rev-parse "${{ github.event.inputs.version }}" >/dev/null 2>&1; then + if git tag -l "${{ github.event.inputs.version }}" | grep -q .; then echo "Tag ${{ github.event.inputs.version }} already exists!" exit 1 fi