Files
zosbuilder/.github/workflows/release.yaml
Jan De Landtsheer 10025f9fa5 Squashed 'components/mycelium/' content from commit afb32e0
git-subtree-dir: components/mycelium
git-subtree-split: afb32e0cdb2d4cdd17f22a5693278068d061f08c
2025-08-16 21:12:34 +02:00

122 lines
3.9 KiB
YAML

name: Release
permissions:
contents: write
on:
push:
tags:
- v[0-9]+.*
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: CHANGELOG.md
# (required) GitHub token for creating GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}
upload-assets-mycelium:
needs: create-release
strategy:
matrix:
include:
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
# Name of the compiled binary, also name of the non-extension part of the produced file
bin: mycelium
# --target flag value, default is host
target: ${{ matrix.target }}
# Name of the archive when uploaded
archive: $bin-$target
# (required) GitHub token for uploading assets to GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}
# Specify manifest since we are in a subdirectory
manifest-path: myceliumd/Cargo.toml
# TODO: Figure out the correct matrix setup to have this in a single action
upload-assets-myceliumd-private:
needs: create-release
strategy:
matrix:
include:
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
# Name of the compiled binary, also name of the non-extension part of the produced file
bin: mycelium-private
# Set the vendored-openssl flag for provided release builds
features: vendored-openssl
# --target flag value, default is host
target: ${{ matrix.target }}
# Name of the archive when uploaded
archive: $bin-$target
# (required) GitHub token for uploading assets to GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}
# Specify manifest since we are in a subdirectory
manifest-path: myceliumd-private/Cargo.toml
build-msi:
needs: create-release
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Create .exe file
shell: bash
run: cd myceliumd && RUSTFLAGS="-C target-feature=+crt-static" cargo build --release && cd ..
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4.0.0
- name: Install WiX Toolset
run: dotnet tool install --global wix
- name: Add WixToolset.UI.wixext extension
run: wix extension add WixToolset.UI.wixext
- name: Download Wintun zip file
run: curl -o wintun.zip https://www.wintun.net/builds/wintun-0.14.1.zip
- name: Unzip Wintun
run: unzip wintun.zip
- name: Move .dll file to myceliumd directory
run: move wintun\bin\amd64\wintun.dll myceliumd
- name: Build MSI package
run: wix build -loc installers\windows\wix\mycelium.en-us.wxl installers\windows\wix\mycelium.wxs -ext WixToolset.UI.wixext -arch x64 -dcl high -out mycelium_installer.msi
- name: Upload MSI artifact
uses: alexellis/upload-assets@0.4.0
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["mycelium_installer.msi"]'