Bump actions/checkout from 3 to 4 (#23) #97
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 and Upload | |
on: | |
push: | |
paths-ignore: | |
- 'README.md' | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
configuration: [Release] | |
include: | |
- os: ubuntu-latest | |
COMMAND: Atomic.Gtk -p:PublishSingleFile=true -p:DebugType=embedded -r ubuntu.18.04-x64 --no-self-contained -o builds/ubuntu-latest -p:BuildPlatform=Gtk | |
ARTIFACT: builds/ubuntu-latest | |
POSTBUILD: echo "nothing to do!" | |
- os: macOS-latest | |
COMMAND: Atomic.Mac -o builds/macOS-latest | |
ARTIFACT: builds/macOS-latest | |
POSTBUILD: rm -r builds/macOS-latest/* && mv Atomic.Mac/bin/Release/net6.0-macos/Atomic.Mac.app builds/macOS-latest/Atomic.Mac.app | |
- os: windows-latest | |
COMMAND: Atomic.Wpf -p:PublishSingleFile=true -p:DebugType=embedded -r win-x86 --no-self-contained -o builds/windows-latest | |
ARTIFACT: builds/windows-latest | |
POSTBUILD: echo "nothing to do!" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 6.0.x | |
- name: Install Mac workload | |
working-directory: ./Atomic | |
run: dotnet workload install macos | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet publish ${{ matrix.COMMAND }} -c "${{ matrix.configuration }}" | |
- name: Post-Build | |
run: | | |
cp ./LICENSE ./${{ matrix.ARTIFACT }}/ | |
${{ matrix.POSTBUILD }} | |
# Steps for uploading artifacts. | |
- name: Zip to Archive | |
run: 7z a -tzip ${{ matrix.os }}.zip ./${{ matrix.ARTIFACT }} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4.0.0 | |
with: | |
name: ${{ matrix.os }} | |
path: ${{ matrix.os }}.zip |