We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94c0956 commit 65b32d4Copy full SHA for 65b32d4
.github/workflows/cargo-publish.yml
@@ -33,9 +33,19 @@ jobs:
33
- uses: Swatinem/rust-cache@v2
34
with:
35
workspaces: rust
36
- - name: Checkout specified tag
+ - name: Verify and checkout specified tag
37
if: github.event_name == 'workflow_dispatch'
38
- run: git checkout ${{ github.event.inputs.tag }}
+ run: |
39
+ git fetch --all --tags
40
+ if git rev-parse ${{ github.event.inputs.tag }} >/dev/null 2>&1; then
41
+ git checkout ${{ github.event.inputs.tag }}
42
+ echo "Successfully checked out tag ${{ github.event.inputs.tag }}"
43
+ else
44
+ echo "Error: Tag ${{ github.event.inputs.tag }} does not exist"
45
+ echo "Available tags:"
46
+ git tag -l
47
+ exit 1
48
+ fi
49
- name: Install dependencies
50
run: |
51
sudo apt update
0 commit comments