Skip to content

Commit 84506a2

Browse files
committed
update github workflow
1 parent 1bb6264 commit 84506a2

1 file changed

Lines changed: 26 additions & 20 deletions

File tree

.github/workflows/main.yml

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,20 @@ on:
55
pull_request:
66
branches:
77
- master
8-
# run when a new semantic version tag got pushed (a release)
9-
push:
10-
tags:
11-
- "v[0-9]+.[0-9]+(.[0-9]+)?(-[a-z]+(.[0-9])?)?"
12-
# allow to run the workflow manually from the actions tab
8+
# run on github releases
9+
release:
10+
types: [released]
11+
# run the workflow manually from the actions tab
1312
workflow_dispatch:
1413

1514
jobs:
1615
variables:
1716
outputs:
1817
ref_name: ${{ steps.var.outputs.ref_name}}
19-
runs-on: "ubuntu-20.04"
18+
runs-on: "ubuntu-22.04"
2019
steps:
2120
- name: Setting Global Variables
22-
uses: actions/github-script@v6
21+
uses: actions/github-script@v8
2322
id: var
2423
with:
2524
script: |
@@ -41,17 +40,17 @@ jobs:
4140
- {
4241
name: "Ubuntu",
4342
executable_name: "afec-explorer",
44-
os: ubuntu-20.04,
43+
os: ubuntu-22.04,
4544
}
4645
- {
4746
name: "macOS",
4847
executable_name: "AFEC-Explorer.app",
49-
os: macos-13,
48+
os: macos-14,
5049
}
5150

5251
steps:
5352
- name: Checkout
54-
uses: actions/checkout@v3
53+
uses: actions/checkout@v5
5554

5655
- name: Rust Setup (Windows & Linux)
5756
uses: dtolnay/rust-toolchain@stable
@@ -69,16 +68,17 @@ jobs:
6968
workspaces: "./src-tauri -> target"
7069

7170
- name: Node Setup
72-
uses: actions/setup-node@v3
71+
uses: actions/setup-node@v5
7372
with:
74-
node-version: "lts/*"
73+
node-version: "lts/Jod"
7574
cache: "npm"
7675

7776
- name: System dependencies (Linux)
7877
run: |
78+
set -e
7979
sudo apt update
80-
sudo apt install -y libasound2-dev libjack-dev
81-
sudo apt install -y libgtk-3-dev libwebkit2gtk-4.0-dev
80+
sudo apt install -y libasound2-dev libjack-dev
81+
sudo apt install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
8282
if: ${{ matrix.config.name == 'Ubuntu' }}
8383

8484
- name: Node dependencies
@@ -101,7 +101,7 @@ jobs:
101101
WINDOWS_CODE_CERT_DATA: ${{ secrets.WINDOWS_CODE_CERT_DATA }}
102102
WINDOWS_CODE_CERT_PASS: ${{ secrets.WINDOWS_CODE_CERT_PASS }}
103103
if: ${{ matrix.config.name == 'Windows' && env.WINDOWS_CODE_CERT_DATA != null && env.WINDOWS_CODE_CERT_PASS != null }}
104-
uses: lando/code-sign-action@v2
104+
uses: lando/code-sign-action@v3
105105
with:
106106
file: ./src-tauri/target/release/${{ matrix.config.executable_name }}
107107
certificate-data: ${{ secrets.WINDOWS_CODE_CERT_DATA }}
@@ -139,31 +139,37 @@ jobs:
139139

140140
- name: Upload Artifact (Windows)
141141
if: ${{ matrix.config.name == 'Windows' }}
142-
uses: actions/upload-artifact@v3
142+
uses: actions/upload-artifact@v4
143143
with:
144144
name: "AFEC-Explorer-${{ needs.variables.outputs.ref_name }}-windows"
145145
path: ./src-tauri/target/release/*.exe
146146
if-no-files-found: error
147147

148148
- name: Prepare Upload Artifact (Linux)
149149
if: ${{ matrix.config.name == 'Ubuntu' }}
150-
run: cd ./src-tauri/target/release && tar -cvf ${{ matrix.config.executable_name }}.tar ${{ matrix.config.executable_name }}
150+
run: |
151+
set -e
152+
cd ./src-tauri/target/release
153+
tar -cvf ${{ matrix.config.executable_name }}.tar ${{ matrix.config.executable_name }}
151154
152155
- name: Upload Artifact (Linux)
153156
if: ${{ matrix.config.name == 'Ubuntu' }}
154-
uses: actions/upload-artifact@v3
157+
uses: actions/upload-artifact@v4
155158
with:
156159
name: "AFEC-Explorer-${{ needs.variables.outputs.ref_name }}-linux"
157160
path: ./src-tauri/target/release/*.tar
158161
if-no-files-found: error
159162

160163
- name: Prepare Upload Artifact (macOS)
161164
if: ${{ matrix.config.name == 'macOS' }}
162-
run: cd ./src-tauri/target/universal-apple-darwin/release/bundle/macos && tar -cvf ${{ matrix.config.executable_name }}.tar ${{ matrix.config.executable_name }}
165+
run: |
166+
set -e
167+
cd ./src-tauri/target/universal-apple-darwin/release/bundle/macos
168+
tar -cvf ${{ matrix.config.executable_name }}.tar ${{ matrix.config.executable_name }}
163169
164170
- name: Upload Artifact (macOS)
165171
if: ${{ matrix.config.name == 'macOS' }}
166-
uses: actions/upload-artifact@v3
172+
uses: actions/upload-artifact@v4
167173
with:
168174
name: "AFEC-Explorer-${{ needs.variables.outputs.ref_name }}-macOS"
169175
path: ./src-tauri/target/universal-apple-darwin/release/bundle/macos/*.tar

0 commit comments

Comments
 (0)