Compare commits

...

3 Commits

Author SHA1 Message Date
wucke13
f4c351c74b chore: Release rosenpass version 0.1.1-rc.5 2023-02-25 19:53:38 +01:00
wucke13
12522e90ea Merge pull request #12 from rosenpass/dev/fix-release-2
add dedicated release workflow
2023-02-25 19:53:17 +01:00
wucke13
0995317fa6 add dedicated release workflow 2023-02-25 19:51:44 +01:00
5 changed files with 51 additions and 11 deletions

View File

@@ -5,7 +5,6 @@ on:
pull_request:
push:
branches: [main]
tags: ["v*"]
jobs:
build:
@@ -57,14 +56,6 @@ jobs:
with:
name: ${{ matrix.derivation }}-${{ matrix.nix-system }}
path: ${{ matrix.derivation }}-${{ matrix.nix-system }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v') && contains(matrix.derivation, 'static')
with:
files: |
${{ matrix.derivation }}-${{ matrix.nix-system }}
LICENSE-MIT
LICENSE-APACHE
- name: Deploy PDF artifacts
if: ${{ matrix.derivation == 'whitepaper' && github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3

26
.github/workflows/release.yaml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Release
on:
push:
tags: ["v*"]
jobs:
release:
name: Build ${{ matrix.derivation }} on ${{ matrix.nix-system }}
runs-on:
- nix
- ${{ matrix.nix-system }}
strategy:
fail-fast: false
matrix:
nix-system:
- x86_64-linux
# - aarch64-linux
steps:
- uses: actions/checkout@v3
- name: Build release-package for ${{ matrix.nix-system }}
run: nix build .#release-package --print-build-logs
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
result/*

2
Cargo.lock generated
View File

@@ -865,7 +865,7 @@ checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422"
[[package]]
name = "rosenpass"
version = "0.1.1-rc.4"
version = "0.1.1-rc.5"
dependencies = [
"anyhow",
"base64",

View File

@@ -1,6 +1,6 @@
[package]
name = "rosenpass"
version = "0.1.1-rc.4"
version = "0.1.1-rc.5"
authors = ["Karolin Varner <karo@cupdev.net>", "wucke13 <wucke13@gmail.com>"]
edition = "2021"
license = "MIT OR Apache-2.0"

View File

@@ -132,6 +132,29 @@
default = rosenpass;
rosenpass = rpDerivation pkgs;
rosenpass-oci-image = rosenpassOCI "rosenpass";
# derivation for the release
release-package =
let
version = cargoToml.package.version;
package =
if pkgs.hostPlatform.isLinux then
packages.rosenpass-static
else packages.rosenpass;
oci-image =
if pkgs.hostPlatform.isLinux then
packages.rosenpass-static-oci-image
else packages.rosenpass-oci-image;
in
pkgs.runCommandNoCC "lace-result" { }
''
mkdir {bin,$out}
cp ${./.}/rp bin/
tar -cvf $out/rosenpass-${system}-${version}.tar bin/rp \
-C ${package} bin/rosenpass
cp ${oci-image} \
$out/rosenpass-oci-image-${system}-${version}.tar.gz
'';
} // (if pkgs.stdenv.isLinux then rec {
rosenpass-static = rpDerivation pkgs.pkgsStatic;
rosenpass-static-oci-image = rosenpassOCI "rosenpass-static";