Skip to content

Release Build

Release Build #5

Workflow file for this run

on:
release:
types: [published]
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
matrix:
target:
- linux-x64
- linux-musl-x64
- linux-arm
- linux-arm64
- osx-x64
- osx-arm64
- win-arm64
- win-x64
- win-x86
steps:
- name: Checkout code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Setup .NET
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3
with:
dotnet-version: "8.0"
- name: Build
run: dotnet publish /p:DebugType=None /p:DebugSymbols=false /p:PublishReadyToRun=true -c Release -r ${{ matrix.target }} --self-contained -o out/${{ matrix.target }} -- ./src/yk-csr-cli/GenerateYKCSR.csproj
- name: Archive and Hash
run: |
zip -r ./out/${{ matrix.target }}.zip ./out/${{ matrix.target }} -j
sha256sum ./out/${{ matrix.target }}.zip > ./out/${{ matrix.target }}.zip.sha256
- name: Upload
run: gh release upload ${{github.event.release.tag_name}} ./out/${{ matrix.target }}.zip ./out/${{ matrix.target }}.zip.sha256 --clobber
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash