Skip to content

use flake for CI

use flake for CI #76

Workflow file for this run

name: Tag version
on:
workflow_dispatch:
push:
branches:
- master
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@master
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
name: Checkout
- run: |
echo -n "nh_version=v" >> "$GITHUB_ENV"
nix run nixpkgs#fq -- -r ".package.version" Cargo.toml
cat "$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