File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 - name : Build release tarballs
2525 run : nix run .#release
2626
27+ - name : Add version to filenames
28+ run : |
29+ cd release
30+ VERSION="${GITHUB_REF_NAME}"
31+ for f in xenomorph-*.tar.gz; do
32+ newname="${f/xenomorph-/xenomorph-${VERSION}-}"
33+ mv "$f" "$newname"
34+ done
35+ sha256sum *.tar.gz > SHA256SUMS
36+ cat SHA256SUMS
37+
2738 - name : Create Release
2839 uses : softprops/action-gh-release@v1
2940 with :
Original file line number Diff line number Diff line change 1919 let
2020 pkgs = nixpkgs . legacyPackages . ${ system } ;
2121
22- version = if ( self ? rev ) then "0.2.0- ${ self . shortRev } " else "0.2.0- dev" ;
22+ version = if ( self ? shortRev ) then self . shortRev else "dev" ;
2323
2424 # Static build targets (Zig cross-compilation)
2525 targets = {
8181 nativeBuildInputs = [ pkgs . gnutar pkgs . gzip ] ;
8282
8383 buildPhase = ''
84- mkdir -p xenomorph- ${ version } /bin
85- cp $src/bin/xenomorph xenomorph- ${ version } /bin/
86- cp -r ${ ./. } /init xenomorph- ${ version } / 2>/dev/null || true
87- cp ${ ./. } /README.md xenomorph- ${ version } / 2>/dev/null || echo "No README" > xenomorph- ${ version } /README.md
88- cp ${ ./. } /LICENSE xenomorph- ${ version } / 2>/dev/null || true
84+ mkdir -p xenomorph/bin
85+ cp $src/bin/xenomorph xenomorph/bin/
86+ cp -r ${ ./. } /init xenomorph/ 2>/dev/null || true
87+ cp ${ ./. } /README.md xenomorph/ 2>/dev/null || echo "No README" > xenomorph/README.md
88+ cp ${ ./. } /LICENSE xenomorph/ 2>/dev/null || true
8989 '' ;
9090
9191 installPhase = ''
9292 mkdir -p $out
93- tar -czvf $out/xenomorph-${ version } - ${ name } .tar.gz xenomorph- ${ version }
93+ tar -czvf $out/xenomorph-${ name } .tar.gz xenomorph
9494 '' ;
9595 } ;
9696
You can’t perform that action at this time.
0 commit comments