From 1b0025d3cf0b0b3c42c2754fe30696207f5996b5 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 1 Jun 2023 18:31:38 +1200 Subject: [PATCH 1/2] Add GHA to upload draft release assets Automate generating release binaries for musl/mac/win on every tag to cardano-node repository. --- .github/workflows/release-upload.yaml | 47 +++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/release-upload.yaml diff --git a/.github/workflows/release-upload.yaml b/.github/workflows/release-upload.yaml new file mode 100644 index 00000000000..ac2510738fa --- /dev/null +++ b/.github/workflows/release-upload.yaml @@ -0,0 +1,47 @@ +name: Post Release Upload +# This makes it easy to get download release binaries built using +# a github action for any tagged commit. +# +# This workflow builds and uploads the macOS, win64 and linux +# binary packages as github assets. +# +# It uses `--builders "" --max-jobs 0` to ensure the assets are +# from the IOG cache. +on: + release: + types: + - published + push: + tags: + - '**' + +jobs: + build: + name: "Upload Assets" + runs-on: ubuntu-latest + steps: + - name: Install Nix with good defaults + uses: cachix/install-nix-action@v20 + with: + extra_nix_config: | + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= + substituters = https://cache.iog.io/ https://cache.nixos.org/ + nix_path: nixpkgs=channel:nixos-unstable + - name: Checkout repository + uses: actions/checkout@v3 + - name: Build + run: | + nix build --builders "" --max-jobs 0 .#hydraJobs.musl.cardano-node-linux + cp result/cardano-node-*-linux.tar.gz . + nix build --builders "" --max-jobs 0 .#legacyPackages.x86_64-darwin.hydraJobs.native.cardano-node-macos + cp result/cardano-node-*-macos.tar.gz . + nix build --builders "" --max-jobs 0 .#hydraJobs.windows.cardano-node-win64 + cp result/cardano-node-*-win64.zip . + - name: Release + uses: softprops/action-gh-release@v1 + with: + draft: true + files: | + cardano-node-*-win64.zip + cardano-node-*-macos.tar.gz + cardano-node-*-linux.tar.gz From e03dab46df4aa0a37a9c2535fea0ec2692859143 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Giraudeau Date: Thu, 1 Jun 2023 10:03:15 +0200 Subject: [PATCH 2/2] Use only official Github actions or actions under IOG org. --- .github/workflows/release-upload.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-upload.yaml b/.github/workflows/release-upload.yaml index ac2510738fa..4404ec4aae8 100644 --- a/.github/workflows/release-upload.yaml +++ b/.github/workflows/release-upload.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Nix with good defaults - uses: cachix/install-nix-action@v20 + uses: input-output-hk/install-nix-action@v20 with: extra_nix_config: | trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= @@ -38,7 +38,7 @@ jobs: nix build --builders "" --max-jobs 0 .#hydraJobs.windows.cardano-node-win64 cp result/cardano-node-*-win64.zip . - name: Release - uses: softprops/action-gh-release@v1 + uses: input-output-hk/action-gh-release@v1 with: draft: true files: |