This repository has been archived by the owner on Nov 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (97 loc) · 3.15 KB
/
pre-release.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Pre-release App
# You may pin to the exact commit or the version.
# uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
on:
push:
branches: [ dev ]
jobs:
retrievingVersion:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.versionstep.outputs.version }}
previousTag: ${{ steps.previousTag.outputs.previousTag }}
steps:
- uses: actions/checkout@v3
with:
fetch-tags: true
fetch-depth: 0
- name: Expose git commit data
uses: rlespinasse/git-commit-data-action@v1
- name: Retrieve Release Version
id: versionstep
working-directory: sot_richpresence
run: |
VERSION=$(more pubspec.yaml | grep version: | cut -d ' ' -f2)
echo "version=${VERSION}-beta" >> $GITHUB_OUTPUT
echo "VERSION=${VERSION}-beta" >> $GITHUB_ENV
build_windows:
runs-on: windows-latest
needs: retrievingVersion
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.6'
channel: 'stable'
- name: Build windows
working-directory: ./sot_richpresence
run: flutter build windows --build-name ${{ needs.retrievingVersion.outputs.version }}
- uses: actions/upload-artifact@v3
with:
name: build_windows
path: ./sot_richpresence/build/windows/x64/runner/Release
build_linux:
runs-on: ubuntu-latest
needs: retrievingVersion
steps:
- uses: actions/checkout@v3
- run: |
sudo apt-get update -y
sudo apt install libmpv-dev mpv
sudo apt-get install -y ninja-build libgtk-3-dev
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.6'
channel: 'stable'
- name: Build linux
working-directory: ./sot_richpresence
run: flutter build linux --build-name ${{ needs.retrievingVersion.outputs.version }}
- uses: actions/upload-artifact@v3
with:
name: build_linux
path: ./sot_richpresence/build/linux/x64/release/bundle
upload:
runs-on: ubuntu-latest
needs:
- build_windows
- build_linux
- retrievingVersion
steps:
- uses: actions/checkout@v3
with:
ref: dev
- run: mkdir -p dist
- uses: actions/download-artifact@v3
with:
name: build_windows
path: dist/SOT_RichPresence_Windows
- uses: actions/download-artifact@v3
with:
name: build_linux
path: dist/SOT_RichPresence_Linux
- name: Zipping windows release
working-directory: dist/SOT_RichPresence_Windows
run: |
zip -r ../../SOT_RichPresence_Windows.zip *
- name: Zipping linux release
working-directory: dist/SOT_RichPresence_Linux
run: |
zip -r ../../SOT_RichPresence_Linux.zip *
- name: Upload release onto Github
uses: ncipollo/release-action@v1
with:
artifacts: 'SOT_RichPresence_Windows.zip,SOT_RichPresence_Linux.zip'
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ needs.retrievingVersion.outputs.version }}
prerelease: true
allowUpdates: true