Skip to content

Commit

Permalink
fix tags
Browse files Browse the repository at this point in the history
  • Loading branch information
yshavit committed Mar 2, 2025
1 parent 1c13c96 commit 4d7e685
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/prepare-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: "v${{ github.event.inputs.current_version }}"
permissions:
contents: write
pull-requests: write
Expand All @@ -37,8 +38,6 @@ jobs:
echo "::error ::tag $TAG_NAME already exists"
exit 1
fi
env:
TAG_NAME: "v${{ github.event.inputs.current_version }}"
- name: Prepare random dir
id: random-dir
Expand Down Expand Up @@ -92,16 +91,15 @@ jobs:
- name: Create new release
id: create_release
run: |
release_url="$(gh release create "v${{ github.event.inputs.current_version }}" --draft --title "v${{ github.event.inputs.current_version }}" --generate-notes --target "$TARGET_REF")"
release_url="$(gh release create "$TAG_NAME" --draft --title "$TAG_NAME" --generate-notes --target "$TARGET_REF")"
echo "release_url=$release_url" >> "$GITHUB_OUTPUT"
env:
TARGET_REF: ${{ github.event.inputs.base_ref }}

- name: Upload artifacts
run: gh release upload "$RELEASE_TAG" "$TMP_DIR"/*
run: gh release upload "$TAG_NAME" "$TMP_DIR"/*
env:
TMP_DIR: ${{ steps.random-dir.outputs.path }}
RELEASE_TAG: "v${{ github.event.inputs.new_version }}"

- name: Update Cargo.toml
run: sed -i 's/^version = ".*"/version = "${{ github.event.inputs.new_version }}"/' Cargo.toml
Expand Down

0 comments on commit 4d7e685

Please sign in to comment.