Release #17
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
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
component: | |
description: "The component to release" | |
required: true | |
type: choice | |
options: | |
- identity-server | |
jobs: | |
build: | |
name: Build the code for each platform | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/[email protected] | |
- uses: mlugg/[email protected] | |
with: | |
version: 0.13.0 | |
- name: Cache cargo dependencies | |
uses: Swatinem/[email protected] | |
# - name: Install mingw | |
# run: sudo apt-get install -y mingw-w64 | |
- name: Install cargo-zigbuild | |
run: cargo install --locked [email protected] | |
- name: Cargo zigbuild | |
run: | | |
cargo zigbuild \ | |
--target x86_64-unknown-linux-musl \ | |
--target aarch64-unknown-linux-musl \ | |
--target x86_64-pc-windows-gnu \ | |
--profile artifact \ | |
-p ${{ inputs.component }} | |
- name: Arrange artifact directory | |
run: | | |
mkdir artifacts | |
for f in target/*/artifact/${{ inputs.component}}{,\.exe}; do | |
arch="$(echo "${f}" | cut -d '/' -f2)" | |
file_name="$(echo "${f}" | cut -d '/' -f4)" | |
mv "${f}" "artifacts/${arch}/${file_name}" | |
done | |
ls -R artifacts | |
- name: Upload artifacts | |
uses: actions/[email protected] | |
with: | |
name: artifacts | |
if-no-files-found: error | |
retention-days: 30 | |
path: | | |
artifacts |