Fix download-artifact #112
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: build | |
on: | |
pull_request: | |
types: [ synchronize, opened ] | |
push: | |
branches: | |
- main | |
jobs: | |
build-artifacts: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
runtime: [ win-x64, linux-x64, linux-arm64, osx-x64 ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build artifact | |
shell: pwsh | |
run: | | |
$srcPath = Join-Path (Pwd) src | |
docker run -v "$($srcPath):/var/src" mcr.microsoft.com/dotnet/sdk:8.0.100-1-alpine3.18 ash -c "dotnet publish -r ${{ matrix.runtime }} --self-contained -p:PublishTrimmed=true -p:PublishSingleFile=true -c Release /var/src/GetMoarFediverse.csproj -o /var/output" | |
build-docker: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
architecture: [ amd64, arm64v8 ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build things | |
shell: pwsh | |
run: | | |
if ('${{ matrix.architecture }}' -eq 'arm64v8') { | |
sudo apt-get install qemu binfmt-support qemu-user-static | |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
sed -i 's/8.0.100-1-alpine3.18/8.0.100-alpine3.18/' Dockerfile | |
} | |
docker build . --build-arg ARCH=${{ matrix.architecture }} |