forked from IceYGO/windbot
-
-
Notifications
You must be signed in to change notification settings - Fork 53
130 lines (125 loc) · 4.05 KB
/
Copy pathwindbot.yml
File metadata and controls
130 lines (125 loc) · 4.05 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Build EDOPro
on: [push, pull_request]
env:
DEPLOY_REPO: ${{ secrets.DEPLOY_REPO }}
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
DEPLOY_BRANCH: ${{ secrets.DEPLOY_BRANCH }}
jobs:
create_release:
runs-on: ubuntu-latest
outputs:
output: ${{steps.create.outputs.id}}
steps:
- name: Create release
if: startsWith(github.ref, 'refs/tags/')
id: create
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false
Build:
runs-on: ubuntu-latest
needs: create_release
steps:
- name: Set ARTIFACT env var
shell: bash
run: |
echo "DESKTOP_ARTIFACT=WindBotIgnite-Release-$(date +%Y%m%d)-${{ github.sha }}.zip" >> $GITHUB_ENV
- uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
- name: Pull mono builder image
run: |
docker pull ghcr.io/projectignis/mono_xamarin_builder_monodroid:master
docker image tag ghcr.io/projectignis/mono_xamarin_builder_monodroid:master monodroid
- name: Build
shell: bash
run: |
docker run --rm --volume $PWD:/project monodroid -t:restore -p:RestorePackagesPath=./.nuget WindBot.sln
./ci/install-patched-mono-runtime.sh
docker run --rm --volume $PWD:/project monodroid -m -p:Configuration=Release WindBot.sln -p:Posix=true
- name: Predeploy
shell: bash
run: |
mkdir staging
cd bin && mv Release WindBot
rm WindBot/mscorlib* WindBot/libWindbot*
7z a -tzip "$DESKTOP_ARTIFACT" WindBot
mv WindBot ../staging/
mv $DESKTOP_ARTIFACT ..
mkdir -p WindBot
cp -r ../COPYING ../LICENSE ../bots.json ../Decks/ ../Dialogs/ WindBot/
7z a WindBotIgnite-Resources.7z WindBot && cd ..
mkdir -p assets
mv output/libWindbot.aar bin/WindBotIgnite-Resources.7z $DESKTOP_ARTIFACT assets
cp assets/libWindbot.aar staging/
- name: Deploy
if: ${{ github.event_name == 'push' }}
shell: bash
run: ./ci/deploy.sh
- name: Upload Release Assets
if: startsWith(github.ref, 'refs/tags/')
id: upload-release-assets
uses: dwenegar/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.create_release.outputs.output }}
assets_path: assets
Build_linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- runtime_name: linux-x64
- runtime_name: linux-arm64
needs: create_release
steps:
- name: Set ARTIFACT env var
shell: bash
run: |
echo "DESKTOP_ARTIFACT=WindBotIgnite-Release-$(date +%Y%m%d)-${{ github.sha }}.zip" >> $GITHUB_ENV
- uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
- name: Pull mono builder image
run: |
docker pull ghcr.io/projectignis/net8_linux_builder:master
docker image tag ghcr.io/projectignis/net8_linux_builder:master net8
- name: Build
shell: bash
run: |
docker run --rm --volume $PWD:/project net8 publish net8/WindBot.csproj -p:RestorePackagesPath=./.nuget -c Release -r ${{ matrix.runtime_name }}
Build_mac:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
include:
- runtime_name: osx-x64
- runtime_name: osx-arm64
needs: create_release
steps:
- name: Set ARTIFACT env var
shell: bash
run: |
echo "DESKTOP_ARTIFACT=WindBotIgnite-Release-$(date +%Y%m%d)-${{ github.sha }}.zip" >> $GITHUB_ENV
- uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
- name: Build
shell: bash
run: |
dotnet publish net8/WindBot.csproj -p:RestorePackagesPath=./.nuget -c Release -r ${{ matrix.runtime_name }}
# assets to upload android
# - $ARTIFACT
# - libWindbot.aar
# - WindBotIgnite-Resources.7z