Skip to content

Commit

Permalink
Build binary release on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ninegua committed Jul 4, 2021
1 parent eb92edd commit 350470c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "release"

on:
release:
types: [created]

jobs:
release:
name: "Release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: cachix/install-nix-action@v13
with:
nix_path: nixpkgs=channel:nixos-21.05
- uses: cachix/cachix-action@v10
with:
name: ninegua
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix-build
- run: export name=ic-utils-$(echo ${{ github.ref }} | cut -d/ -f3) && tar -zcv -C result/ --transform "s,^.,$name," -f $name-linux-x86_64.tar.gz .
- name: Upload release package
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: ic-utils-*.tar.gz
file_glob: true
5 changes: 2 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ let
in !(baseName == "dist-newstyle" || lib.hasSuffix ".vim" baseName)
&& lib.sources.cleanSourceFilter name type;
cleanSource = src: lib.sources.cleanSourceWith { inherit filter src; };
in with pkgs;
stdenv.mkDerivation {
name = "ic-util";
in stdenv.mkDerivation {
name = "ic-utils";
version = "0.1.0-pre";
phases = [ "installPhase" ];
installPhase = ''
Expand Down

0 comments on commit 350470c

Please sign in to comment.