-
Notifications
You must be signed in to change notification settings - Fork 4
65 lines (52 loc) · 1.95 KB
/
build-release-linux.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
name: Build Linux Release
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
build-linux-release:
runs-on: ubuntu-latest
env:
RELEASE_VERSION: ${{ github.ref_name }} # Set the release version from the tag
steps:
- uses: actions/[email protected]
- name: Setup Node
uses: actions/[email protected]
with:
node-version: lts/*
- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
- name: Install Ubuntu Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install Frontend Dependencies
run: npm install
- name: Build Tauri App
uses: tauri-apps/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Rename and Calculate Hashes for Release
run: |
# Rename the .deb file to include the release version
DEB_FILE=$(find src-tauri/target/release/bundle/deb -name "*.deb" | head -n 1)
NEW_DEB_FILE="src-tauri/target/release/bundle/deb/Uplink_${{ env.RELEASE_VERSION }}.deb"
mv "$DEB_FILE" "$NEW_DEB_FILE"
# Calculate SHA256 hash for the renamed .deb file
sha256sum "$NEW_DEB_FILE" > src-tauri/target/release/bundle/deb/SHA256SUM
- name: Upload Ubuntu Installer
uses: actions/[email protected]
with:
name: build-ubuntu
path: |
src-tauri/target/release/bundle/deb/Uplink_${{ env.RELEASE_VERSION }}.deb
src-tauri/target/release/bundle/deb/SHA256SUM
retention-days: 5
- name: GitHub Release Linux
uses: softprops/action-gh-release@v2
with:
files: |
src-tauri/target/release/bundle/deb/Uplink_${{ env.RELEASE_VERSION }}.deb
src-tauri/target/release/bundle/deb/SHA256SUM