Use Github Actions to build on each commit / PR (#30)
parent
8582dec8dd
commit
bd01e41d25
@ -0,0 +1,52 @@
|
|||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths-ignore:
|
||||||
|
- 'README.md'
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
paths-ignore:
|
||||||
|
- 'README.md'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||||
|
configuration: [Release]
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
COMMAND: AM2RLauncher.Gtk -c Release -p:PublishSingleFile=true -p:DebugType=embedded -r ubuntu.18.04-x64 --no-self-contained
|
||||||
|
ARTIFACT: AM2RLauncher/AM2RLauncher.Gtk/bin/Release/net5.0/ubuntu.18.04-x64/publish/
|
||||||
|
- os: macOS-latest
|
||||||
|
COMMAND: AM2RLauncher.Mac -c Release -r osx-x64 --no-self-contained
|
||||||
|
ARTIFACT: AM2RLauncher/AM2RLauncher.Mac/bin/Release/net6.0/osx-x64/AM2RLauncher.Mac.app/
|
||||||
|
- os: windows-latest
|
||||||
|
COMMAND: AM2RLauncher.Wpf -c Release -r win-x86 -o builds\win86
|
||||||
|
ARTIFACT: AM2RLauncher\AM2RLauncher.Wpf\bin\Release\net48\win-x86\
|
||||||
|
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
|
||||||
|
working-directory: ./AM2RLauncher
|
||||||
|
run: dotnet restore
|
||||||
|
- name: Build
|
||||||
|
working-directory: ./AM2RLauncher
|
||||||
|
run: dotnet publish ${{ matrix.COMMAND }} -c "${{ matrix.configuration }}"
|
||||||
|
# Steps for uploading artifacts. We don't need them currently, so they're commented out.
|
||||||
|
#- 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
|
||||||
Loading…
Reference in new issue