-
Notifications
You must be signed in to change notification settings - Fork 56
155 lines (133 loc) · 4.32 KB
/
release.yaml
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: Release
on:
workflow_dispatch:
push:
branches:
- ci/fix-release-action
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
concurrency:
group: release
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
# MacOS (Intel & Apple Silicon)
- platform: macos-latest
rust-targets: x86_64-apple-darwin,aarch64-apple-darwin
tauri-target: universal-apple-darwin
# 64-bit Linux
- platform: ubuntu-22.04
rust-targets: x86_64-unknown-linux-gnu
tauri-target: x86_64-unknown-linux-gnu
# 64-bit Windows
- platform: windows-latest
rust-targets: x86_64-pc-windows-msvc
tauri-target: x86_64-pc-windows-msvc
# 32-bit Windows
- platform: windows-latest
rust-targets: i686-pc-windows-msvc
tauri-target: i686-pc-windows-msvc
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
with:
toolchain: nightly
targets: ${{ matrix.rust-targets }}
- uses: swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894
with:
workspaces: packages/desktop
shared-key: ${{ matrix.tauri-target }}-${{ hashFiles('packages/desktop/Cargo.lock') }}
- name: Install dependencies (Ubuntu)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- run: pnpm i
- run: pnpm build --filter zebar --filter @zebar/client
- uses: tauri-apps/tauri-action@v0
id: tauri
with:
projectPath: packages/desktop
args: --target ${{ matrix.tauri-target }}
- name: Move & rename artifacts
run: |
mkdir tmp
ARTIFACTS='${{ steps.tauri.outputs.artifactPaths }}'
for ARTIFACT in $(echo "$ARTIFACTS" | jq -r '.[]'); do
mv "$ARTIFACT" "tmp/tauri.${ARTIFACT##*.}"
done
shell: bash
- run: echo ${{ github.run_id }}
- uses: actions/upload-artifact@v4
with:
name: bundle-${{ matrix.tauri-target }}
if-no-files-found: error
path: tmp
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: tmp
- run: ls -al
- run: cd tmp
- run: ls -al
# - uses: pnpm/action-setup@v2
# with:
# version: 8
# - uses: actions/setup-node@v4
# with:
# node-version: 20
# cache: pnpm
# - run: pnpm i
# - uses: glzr-io/actions/semantic-release@main
# with:
# gh-publish: true
# gh-token: ${{ secrets.GITHUB_TOKEN }}
# gh-draft-release: false
# gh-assets: |
# [
# {
# "path": "tmp/bundle-x86_64-pc-windows-msvc/tauri.msi",
# "name": "Zebar_x64_${nextRelease.gitTag}.msi"
# },
# {
# "path": "tmp/bundle-i686-pc-windows-msvc/tauri.msi",
# "name": "Zebar_x86_${nextRelease.gitTag}.msi"
# },
# {
# "path": "tmp/bundle-universal-apple-darwin/tauri.dmg",
# "name": "Zebar_${nextRelease.gitTag}.dmg"
# },
# {
# "path": "tmp/bundle-x86_64-unknown-linux-gnu/tauri.deb",
# "name": "Zebar_x64_${nextRelease.gitTag}.deb"
# },
# {
# "path": "tmp/bundle-x86_64-unknown-linux-gnu/tauri.AppImage",
# "name": "Zebar_x64_${nextRelease.gitTag}.AppImage"
# }
# ]
# npm-publish: true
# npm-token: ${{ secrets.NPM_TOKEN }}
# npm-package-root: packages/client-api
# npm-package-manager: pnpm