You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.5 KiB
49 lines
1.5 KiB
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: AM2RModPacker -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
|
|
- os: macOS-latest
|
|
COMMAND: AM2RModPacker -r osx-x64 --no-self-contained -o builds/macOS-latest
|
|
ARTIFACT: builds/macOS-latest
|
|
- os: windows-latest
|
|
COMMAND: AM2RModPacker -p:PublishSingleFile=true -r win-x86 --no-self-contained -o builds/windows-latest -p:BuildPlatform=Windows
|
|
ARTIFACT: builds/windows-latest
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: 6.0.x
|
|
- name: Restore dependencies
|
|
run: dotnet restore
|
|
- name: Build
|
|
run: dotnet publish ${{ matrix.COMMAND }} -c "${{ matrix.configuration }}"
|
|
- name: Post-Build
|
|
run: cp ./LICENSE ./${{ matrix.ARTIFACT }}/
|
|
# Steps for uploading artifacts.
|
|
- name: Zip to Archive
|
|
run: 7z a -tzip ${{ matrix.os }}.zip ./${{ matrix.ARTIFACT }}
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v1.0.0
|
|
with:
|
|
name: ${{ matrix.os }}
|
|
path: ${{ matrix.os }}.zip
|