Update ci.yml #69
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: CI | |
on: push | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Build | |
run: dotnet build | |
- name: Publish | |
run: dotnet publish | |
Pack: | |
needs: Build | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
platform: linux-x64 | |
- os: ubuntu-latest | |
platform: linux-musl-x64 | |
- os: ubuntu-latest | |
platform: linux-arm64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: A | |
if: ${{ matrix.platform == 'linux-arm64' }} | |
run: | | |
sudo dpkg --add-architecture arm64 | |
sudo bash -c 'cat > /etc/apt/sources.list.d/arm64.list <<EOF | |
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted | |
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted | |
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse | |
EOF' | |
sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list | |
sudo sed -i -e 's/deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list | |
sudo apt update | |
sudo apt install -y clang llvm binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu zlib1g-dev:arm64 | |
- name: Publish | |
run: dotnet publish -r ${{ matrix.platform }} --self-contained | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.platform }} | |
path: '**/*.zip' | |
compression-level: 0 | |