Skip to content

Commit 6131831

Browse files
committed
Fix workflow
1 parent f6ad5c1 commit 6131831

1 file changed

Lines changed: 52 additions & 14 deletions

File tree

.github/workflows/release.yaml

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,40 +58,53 @@ jobs:
5858
- uses: actions/checkout@v6
5959
with:
6060
submodules: recursive
61-
- uses: pnpm/action-setup@v5
61+
62+
- name: Install pnpm
63+
uses: pnpm/action-setup@v6
6264
with:
6365
version: 10
64-
run_install: false
66+
6567
- uses: actions/setup-node@v6
6668
with:
67-
node-version: "24"
69+
node-version: 25
70+
6871
- name: Get pnpm store directory
6972
run: |
7073
echo "STORE_PATH=$(pnpm store path --silent)" >> ${GITHUB_ENV}
74+
7175
- name: Write release version
7276
run: |
7377
VERSION=$(echo ${GITHUB_REF_NAME#v} | cut -d '-' -f1)
7478
echo Version: $VERSION
7579
echo "VERSION=$VERSION" >> ${GITHUB_ENV}
80+
7681
- uses: actions/cache@v5
7782
name: Setup pnpm cache
7883
with:
7984
path: ${{ env.STORE_PATH }}
8085
key: ${{ runner.os }}-pnpm-build-store-${{ hashFiles('**/pnpm-lock.yaml') }}
8186
restore-keys: |
8287
${{ runner.os }}-pnpm-build-store-
88+
89+
# Change to '--frozen-lockfile' once this gets fixed:
90+
# https://github.com/pnpm/action-setup/issues/40
8391
- name: Install Node dependencies
84-
run: pnpm install --frozen-lockfile
85-
- uses: dtolnay/rust-toolchain@stable
92+
run: pnpm install --no-frozen-lockfile
93+
94+
- name: Install Rust stable
95+
uses: dtolnay/rust-toolchain@stable
96+
8697
- name: Install dependencies
8798
run: |
8899
apt-get install -y build-essential libgtk-3-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libssl-dev libxdo-dev unzip protobuf-compiler libprotobuf-dev rpm
100+
89101
- name: Build packages
90102
uses: tauri-apps/tauri-action@v0.5.23
91103
env:
92104
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93105
with:
94106
args: "--bundles deb"
107+
95108
- name: Upload DEB
96109
uses: actions/upload-release-asset@v1
97110
env:
@@ -101,13 +114,16 @@ jobs:
101114
asset_path: src-tauri/target/release/bundle/deb/defguard-client_${{ env.VERSION }}_${{ matrix.deb_arch }}.deb
102115
asset_name: defguard-client${{ env.VERSION }}_${{ matrix.deb_arch }}_ubuntu-22-04-lts.deb
103116
asset_content_type: application/octet-stream
117+
104118
- name: Rename dg binary
105119
run: mv src-tauri/target/release/dg dg-linux-${{ env.VERSION }}_${{ matrix.deb_arch }}
120+
106121
- name: Build dg deb
107122
uses: defGuard/fpm-action@main
108123
with:
109124
fpm_args: "dg-linux-${{ env.VERSION }}_${{ matrix.deb_arch }}=/usr/sbin/dg dg.service=/usr/lib/systemd/system/dg.service src-tauri/cli/.env=/etc/defguard/dg.conf"
110125
fpm_opts: "--architecture ${{ matrix.binary_arch }} --debug --output-type deb --version ${{ env.VERSION }} --package dg-linux-${{ env.VERSION }}_${{ matrix.deb_arch }}_ubuntu-22-04-lts.deb"
126+
111127
- name: Upload DEB
112128
uses: actions/upload-release-asset@v1
113129
env:
@@ -147,37 +163,50 @@ jobs:
147163
VERSION=$(echo ${GITHUB_REF_NAME#v} | cut -d '-' -f1)
148164
echo Version: $VERSION
149165
echo "VERSION=$VERSION" >> ${GITHUB_ENV}
150-
- uses: actions/setup-node@v6
166+
167+
- name: Install NodeJS
168+
uses: actions/setup-node@v6
151169
with:
152-
node-version: "24"
153-
- uses: pnpm/action-setup@v5
170+
node-version: 25
171+
172+
- uses: pnpm/action-setup@v6
154173
with:
155174
version: 10
156175
run_install: false
176+
157177
- name: Get pnpm store directory
158178
shell: bash
159179
run: |
160180
echo "STORE_PATH=$(pnpm store path --silent)" >> ${GITHUB_ENV}
161-
- uses: actions/cache@v5
162-
name: Setup pnpm cache
181+
182+
- name: Setup pnpm cache
183+
uses: actions/cache@v5
163184
with:
164185
path: ${{ env.STORE_PATH }}
165186
key: ${{ runner.os }}-pnpm-build-store-${{ hashFiles('**/pnpm-lock.yaml') }}
166187
restore-keys: |
167188
${{ runner.os }}-pnpm-build-store-
189+
190+
# Change to '--frozen-lockfile' once this gets fixed:
191+
# https://github.com/pnpm/action-setup/issues/40
168192
- name: Install Node dependencies
169-
run: pnpm install --frozen-lockfile
170-
- uses: dtolnay/rust-toolchain@stable
193+
run: pnpm install --no-frozen-lockfile
194+
195+
- name: Install Rust stable
196+
uses: dtolnay/rust-toolchain@stable
197+
171198
- name: Install Linux dependencies
172199
run: |
173200
sudo apt-get update
174201
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libssl-dev libxdo-dev unzip protobuf-compiler libprotobuf-dev rpm
202+
175203
- name: Build packages
176204
uses: tauri-apps/tauri-action@v0.5.23 # .24 seems broken, TODO: update when fixed
177205
env:
178206
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
179207
with:
180208
args: "--bundles deb,rpm"
209+
181210
- name: Calculate DEB SHA256
182211
id: calculate-sha256
183212
if: matrix.deb_arch == 'amd64'
@@ -187,6 +216,7 @@ jobs:
187216
echo "DEB SHA256: $DEB_SHA256"
188217
echo "DEB_SHA256=$DEB_SHA256" >> ${GITHUB_ENV}
189218
echo "deb_sha256_${{ matrix.deb_arch }}=$DEB_SHA256" >> ${GITHUB_OUTPUT}
219+
190220
- name: Upload RPM
191221
uses: actions/upload-release-asset@v1
192222
env:
@@ -196,6 +226,7 @@ jobs:
196226
asset_path: src-tauri/target/release/bundle/rpm/defguard-client-${{ env.VERSION }}-1.${{ matrix.binary_arch }}.rpm
197227
asset_name: defguard-client-${{ env.VERSION }}-1.${{ matrix.binary_arch }}.rpm
198228
asset_content_type: application/octet-stream
229+
199230
- name: Upload DEB
200231
uses: actions/upload-release-asset@v1
201232
env:
@@ -205,12 +236,13 @@ jobs:
205236
asset_path: src-tauri/target/release/bundle/deb/defguard-client_${{ env.VERSION }}_${{ matrix.deb_arch }}.deb
206237
asset_name: defguard-client_${{ env.VERSION }}_${{ matrix.deb_arch }}.deb
207238
asset_content_type: application/octet-stream
239+
208240
- name: Rename and tar client binary
209-
- name: Tar client binary
210241
run: |
211242
mv src-tauri/target/release/defguard-client defguard-client-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}
212243
tar -zcf defguard-client-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz \
213244
defguard-client-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}
245+
214246
- name: Upload client archive
215247
uses: actions/upload-release-asset@v1
216248
env:
@@ -220,12 +252,13 @@ jobs:
220252
asset_path: defguard-client-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
221253
asset_name: defguard-client-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
222254
asset_content_type: application/octet-stream
255+
223256
- name: Rename and tar daemon binary
224-
- name: Tar daemon binary
225257
run: |
226258
mv src-tauri/target/release/defguard-service defguard-service-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}
227259
tar -zcf defguard-service-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz \
228260
defguard-service-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}
261+
229262
- name: Upload daemon archive
230263
uses: actions/upload-release-asset@v1
231264
env:
@@ -241,6 +274,7 @@ jobs:
241274
mv src-tauri/target/release/dg dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}
242275
tar -zcf dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz \
243276
dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}
277+
244278
- name: Upload dg archive
245279
uses: actions/upload-release-asset@v1
246280
env:
@@ -250,11 +284,13 @@ jobs:
250284
asset_path: dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
251285
asset_name: dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
252286
asset_content_type: application/octet-stream
287+
253288
- name: Build dg deb
254289
uses: defGuard/fpm-action@main
255290
with:
256291
fpm_args: "dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}=/usr/sbin/dg dg.service=/usr/lib/systemd/system/dg.service src-tauri/cli/.env=/etc/defguard/dg.conf"
257292
fpm_opts: "--architecture ${{ matrix.binary_arch }} --debug --output-type deb --version ${{ env.VERSION }} --package dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.deb"
293+
258294
- name: Upload DEB
259295
uses: actions/upload-release-asset@v1.0.2
260296
env:
@@ -264,11 +300,13 @@ jobs:
264300
asset_path: dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.deb
265301
asset_name: dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.deb
266302
asset_content_type: application/octet-stream
303+
267304
- name: Build dg rpm
268305
uses: defGuard/fpm-action@main
269306
with:
270307
fpm_args: "dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}=/usr/sbin/dg dg.service=/usr/lib/systemd/system/dg.service src-tauri/cli/.env=/etc/defguard/dg.conf"
271308
fpm_opts: "--architecture ${{ matrix.binary_arch }} --debug --output-type rpm --version ${{ env.VERSION }} --package dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.rpm"
309+
272310
- name: Upload RPM
273311
uses: actions/upload-release-asset@v1.0.2
274312
env:

0 commit comments

Comments
 (0)