build and package release artifacts #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow builds and packages the release artifacts, without actually running a release. | |
# | |
# It can sometimes be useful to obtain these binaries built from other branches, or a tag, or when | |
# the release process is being updated, this workflow can be used to test some of the changes. | |
# | |
# The built and packaged binaries will be attached to the workflow run as artifacts, available for | |
# download. | |
name: build and package release artifacts | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: Set to build a particular branch | |
type: string | |
tag: | |
description: Set to build a particular tag | |
type: string | |
# Copied from `release.yml`. | |
# During the build step, the key variables must be sent to the containers for cross platform builds. | |
# If they are changed here, the Justfile also must be updated. | |
env: | |
JUST_BIN_URL: https://github.com/casey/just/releases/download/1.25.2/just-1.25.2-x86_64-unknown-linux-musl.tar.gz | |
WORKFLOW_URL: https://github.com/maidsafe/safe_network/actions/runs | |
GENESIS_PK: ${{ secrets.STABLE_GENESIS_PK }} | |
GENESIS_SK: ${{ secrets.STABLE_GENESIS_SK }} | |
FOUNDATION_PK: ${{ secrets.STABLE_FOUNDATION_PK }} | |
NETWORK_ROYALTIES_PK: ${{ secrets.STABLE_NETWORK_ROYALTIES_PK }} | |
PAYMENT_FORWARD_PK: ${{ secrets.STABLE_REWARD_FORWARDING_PK }} | |
jobs: | |
build: | |
name: build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
- os: macos-latest | |
target: aarch64-apple-darwin | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-musl | |
- os: ubuntu-latest | |
target: arm-unknown-linux-musleabi | |
- os: ubuntu-latest | |
target: armv7-unknown-linux-musleabihf | |
- os: ubuntu-latest | |
target: aarch64-unknown-linux-musl | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.tag || inputs.branch }} | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: cargo-bins/cargo-binstall@main | |
- shell: bash | |
run: cargo binstall --no-confirm just | |
- shell: bash | |
run: just build-release-artifacts "${{ matrix.target }}" | |
- uses: actions/upload-artifact@main | |
with: | |
name: safe_network-${{ matrix.target }} | |
path: | | |
artifacts | |
!artifacts/.cargo-lock | |
package: | |
name: package artifacts | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.tag || inputs.branch }} | |
- uses: actions/download-artifact@master | |
with: | |
name: safe_network-x86_64-pc-windows-msvc | |
path: artifacts/x86_64-pc-windows-msvc/release | |
- uses: actions/download-artifact@master | |
with: | |
name: safe_network-x86_64-unknown-linux-musl | |
path: artifacts/x86_64-unknown-linux-musl/release | |
- uses: actions/download-artifact@master | |
with: | |
name: safe_network-aarch64-apple-darwin | |
path: artifacts/aarch64-apple-darwin/release | |
- uses: actions/download-artifact@master | |
with: | |
name: safe_network-x86_64-apple-darwin | |
path: artifacts/x86_64-apple-darwin/release | |
- uses: actions/download-artifact@master | |
with: | |
name: safe_network-arm-unknown-linux-musleabi | |
path: artifacts/arm-unknown-linux-musleabi/release | |
- uses: actions/download-artifact@master | |
with: | |
name: safe_network-armv7-unknown-linux-musleabihf | |
path: artifacts/armv7-unknown-linux-musleabihf/release | |
- uses: actions/download-artifact@master | |
with: | |
name: safe_network-aarch64-unknown-linux-musl | |
path: artifacts/aarch64-unknown-linux-musl/release | |
- uses: cargo-bins/cargo-binstall@main | |
- shell: bash | |
run: cargo binstall --no-confirm just | |
- name: package binaries | |
shell: bash | |
run: | | |
just package-all-bins | |
- uses: actions/upload-artifact@main | |
with: | |
name: packaged_binaries | |
path: packaged_bins | |
- name: package architectures | |
shell: bash | |
run: | | |
just package-all-architectures | |
- uses: actions/upload-artifact@main | |
with: | |
name: packaged_architectures | |
path: packaged_architectures |