-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
907c84c
commit 1dd630e
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
|
||
name: Build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: build-${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, macos-latest, ubuntu-20.04] | ||
fail-fast: false | ||
steps: | ||
- name: Expose GitHub Runtime | ||
uses: crazy-max/ghaction-github-runtime@v3 | ||
- name: Add msbuild to PATH | ||
if: runner.os == 'Windows' | ||
uses: microsoft/[email protected] | ||
- name: Install Linux dependencies | ||
if: runner.os == 'Linux' | ||
run: sudo apt-get install build-essential git make cmake autoconf automake pkg-config | ||
shell: bash | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Run CAKE | ||
run: dotnet run --project ./build/Build.csproj --universalBinary=true | ||
env: | ||
ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }} | ||
ACTIONS_RUNTIME_URL: "${{ env.ACTIONS_RUNTIME_URL }}" | ||
deploy: | ||
name: deploy | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: write | ||
needs: [ build ] | ||
if: ${{ github.event_name == 'push' }} | ||
steps: | ||
- name: Expose GitHub Runtime | ||
uses: crazy-max/ghaction-github-runtime@v3 | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Run CAKE | ||
run: dotnet run --project ./build/Build.csproj -- --target=Package --universalBinary=true --libraryname=Assimp --licensepath=assimp/LICENSE -v:diagnostic | ||
env: | ||
ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }} | ||
ACTIONS_RUNTIME_URL: "${{ env.ACTIONS_RUNTIME_URL }}" | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Make a release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
name: 'MonoGame.Library.Assimp ${{ github.ref_name }}' | ||
tag: ${{ github.ref_name }} | ||
allowUpdates: true | ||
removeArtifacts: true | ||
artifacts: "bin/Release/*.nupkg" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
if: github.ref_type == 'tag' |