Merge pull request #119 from viperML/update-1717215420 #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tag version | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@main | |
- uses: actions/checkout@v3 | |
name: Checkout | |
- run: | | |
echo -n "nh_version=v" >> "$GITHUB_ENV" | |
nix shell nixpkgs#nushell -c \ | |
nu -c "open Cargo.toml | get package | get version" \ | |
>> "$GITHUB_ENV" | |
name: Read version | |
- name: Tag | |
run: | | |
set -x | |
set +e | |
git show-ref --tags $nh_version --quiet | |
if [[ $? -ne 0 ]]; then | |
git tag $nh_version | |
git push --tags | |
fi |