-
Notifications
You must be signed in to change notification settings - Fork 13
39 lines (38 loc) · 1.48 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
name: "release"
on:
push:
tags:
- 'release/**'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/[email protected]
- name: install nix
uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://hydra.iohk.io https://cache.nixos.org/
- name: install cachix
uses: cachix/cachix-action@v10
with:
name: canonical-llc
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: set supported systems
run: echo $(uname -m)-$(uname -s) | tr '[:upper:]' '[:lower:]' | sed -E 's/^(.*)$/[ "\1" ]/' | tee supported-systems.nix
- name: set version
run: echo "RELEASE_VERSION=$(echo $GITHUB_REF_NAME | cut -f 2 -d /)" >> $GITHUB_ENV
- name: build
run: nix flake check --print-build-logs
- name: build release
run: nix build --print-build-logs -f release.nix --argstr version ${{ env.RELEASE_VERSION }}
- name: copy tarball
run: cp --no-preserve=all --dereference result jpg-store-bulk-purchase-${{ env.RELEASE_VERSION }}.tar.gz
- name: release
uses: softprops/action-gh-release@v1
with:
files: jpg-store-bulk-purchase-${{ env.RELEASE_VERSION }}.tar.gz