-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (74 loc) · 2.46 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Build
on:
push:
branches:
- main
tags:
- 1.**
pull_request:
branches:
- main
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/setup-msbuild@v1.0.2
- 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: Install Linux OpenAL dependencies
if: runner.os == 'Linux'
run: sudo apt-get install libasound2-dev libpulse-dev libjack-dev libsdl2-dev oss4-dev libpipewire-0.3-dev
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: Rename License File
run: mv ./openal-soft/LICENSE-pffft ./openal-soft/LICENSE
- name: Run CAKE
run: dotnet run --project ./build/Build.csproj -- --target=Package --universalBinary=true --libraryname=OpenAL --licensepath=openal-soft/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.OpenAL ${{ github.ref_name }}'
tag: ${{ github.ref_name }}
allowUpdates: true
removeArtifacts: true
artifacts: "bin/Release/*.nupkg"
token: ${{ secrets.GITHUB_TOKEN }}
if: github.ref_type == 'tag'