Skip to content

Commit

Permalink
Tag the new release on Publish action (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
N3xed authored and ivmarkov committed Aug 5, 2022
1 parent dc1e0e4 commit f833ab5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

env:
rust_toolchain: nightly-2022-04-07
crate_name: embedded-svc

jobs:
publish:
Expand All @@ -25,3 +26,13 @@ jobs:
run: cargo login ${{ secrets.crates_io_token }}
- name: Build | Publish
run: cargo publish --target riscv32imc-esp-espidf -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort
- name: Get the crate version from cargo
run: |
version=$(cargo metadata --format-version=1 --no-deps | jq -r ".packages[] | select(.name == \"${{env.crate_name}}\") | .version")
echo "crate_version=$version" >> $GITHUB_ENV
echo "${{env.crate_name}} version: $version"
- name: Tag the new release
uses: rickstaa/action-create-tag@v1
with:
tag: v${{env.crate_version}}
message: "Release v${{env.crate_version}}"

0 comments on commit f833ab5

Please sign in to comment.