Skip to content

Commit

Permalink
Add GHA to upload draft release assets
Browse files Browse the repository at this point in the history
Automate generating release binaries for musl/mac/win on every tag to cardano-node repository.
  • Loading branch information
hamishmack committed Jun 1, 2023
1 parent 87a9caa commit 1b0025d
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release-upload.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1b0025d

Please sign in to comment.