-
-
Notifications
You must be signed in to change notification settings - Fork 0
140 lines (119 loc) · 4.35 KB
/
bundle.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
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
131
132
133
134
135
136
137
138
139
140
name: Bundle
on:
push:
tags:
- "v*.*.*"
jobs:
bundle_core:
defaults:
run:
working-directory: core
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
args: '--target aarch64-apple-darwin'
# - platform: 'macos-latest' # for Intel based macs.
# args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04.
args: ''
- platform: 'windows-latest'
args: ''
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12.3"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- run: make bundle
- uses: actions/upload-artifact@v4
with:
name: core-${{ matrix.platform }}
retention-days: 1
path: core/dist/*
bundle_desktop:
needs: bundle_core
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
args: '--target aarch64-apple-darwin'
# - platform: 'macos-latest' # for Intel based macs.
# args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04.
args: ''
- platform: 'windows-latest'
args: ''
runs-on: ${{ matrix.platform }}
steps:
- name: Get Tags
id: tag
uses: ildug/get-tag-action@v1
- name: Display version
run: |
echo "Version ${{ steps.tag.outputs.version }}"
echo "Tag ${{ steps.tag.outputs.tag }}"
- uses: actions/checkout@v4
- name: Download bundle artifacts
uses: actions/download-artifact@v4
with:
name: core-${{ matrix.platform }}
path: core/dist
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Update Package Version
uses: jossef/[email protected]
with:
file: webapp/src-tauri/tauri.conf.json
field: package.version
value: ${{ steps.tag.outputs.version }}
- name: Setup Webapp
id: prepare-webapp
uses: ./.github/actions/prepare_webapp
with:
working-directory: webapp
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ steps.tag.outputs.tag }}
releaseName: ${{ steps.tag.outputs.tag }}
releaseDraft: true
args: ${{ matrix.args }}
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
webapp/src-tauri/target/**/release/bundle/**/*.dmg
webapp/src-tauri/target/**/release/bundle/**/*.app
webapp/src-tauri/target/release/bundle/**/*.dmg
webapp/src-tauri/target/release/bundle/**/*.app
webapp/src-tauri/target/release/bundle/**/*.deb
webapp/src-tauri/target/release/bundle/**/*.rpm
webapp/src-tauri/target/release/bundle/**/*.AppImage
webapp/src-tauri/target/release/bundle/**/*.exe
webapp/src-tauri/target/release/bundle/**/*.msi
# # Project rules must be updated to push changes
# # GH013: Repository rule violations found for refs/heads/main.
# - uses: stefanzweifel/git-auto-commit-action@v5
# with:
# commit_message: Bump version to ${{ env.VERSION }}
# branch: main