Skip to content

Commit

Permalink
GHA workflow improvements (#13)
Browse files Browse the repository at this point in the history
* fix registry reference in workflow name

* fix double quote escaping

* compare step output to string
  • Loading branch information
bertrmz authored Aug 23, 2024
1 parent 28add06 commit 2aa2f62
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish to crate.io
name: Publish to crates.io

on:
workflow_dispatch:
Expand Down Expand Up @@ -33,15 +33,17 @@ jobs:

- name: Get version
id: get_version
run: echo "version=$(grep version Cargo.toml | head -n1 | cut -d '"' -f2)" >> "$GITHUB_OUTPUT"
run: |
version=$(grep version Cargo.toml | head -n1 | cut -d '"' -f2)
echo "version=$version" >> "$GITHUB_OUTPUT"
- uses: rickstaa/action-create-tag@v1
id: tag_create
with:
tag: v${{ steps.get_version.outputs.version }}

- name: Create Release
if: ${{ !steps.tag_create.outputs.tag_exists }}
if: ${{ steps.tag_create.outputs.tag_exists != 'true' }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 2aa2f62

Please sign in to comment.