This repository was archived by the owner on Feb 28, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
158 lines (134 loc) · 4.53 KB
/
release-player.yml
File metadata and controls
158 lines (134 loc) · 4.53 KB
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
156
157
158
name: Release Player
on:
push:
tags:
- "player@*.*.*"
permissions:
contents: write
env:
DO_NOT_TRACK: 1
jobs:
release:
strategy:
fail-fast: false
matrix:
include:
- platform: "macos-latest"
args: "--target aarch64-apple-darwin"
arch: "arm64"
- platform: "macos-latest"
args: "--target x86_64-apple-darwin"
arch: "x64"
- platform: "ubuntu-22.04"
args: ""
arch: "x64"
- platform: "windows-latest"
args: ""
arch: "x64"
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract version from tag
id: version
shell: bash
run: |
VERSION=${GITHUB_REF#refs/tags/player@}
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
- name: Setup PNPM
uses: pnpm/action-setup@v4
- name: Get PNPM store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup PNPM cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Cache cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
packages/player/src-tauri/target/
key: ${{ runner.os }}-cargo-v2-${{ hashFiles('**/Cargo.lock') }}
- name: Install system dependencies (Linux only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
TAURI_BUNDLER_DMG_IGNORE_CI: false
with:
tagName: ${{ github.ref_name }}
releaseName: "Nuclear Player v${{ steps.version.outputs.version }}"
releaseBody: "Nuclear Player release v${{ steps.version.outputs.version }}"
releaseDraft: false
prerelease: false
args: ${{ matrix.args }}
- name: Upload .deb for Flatpak build
if: matrix.platform == 'ubuntu-22.04'
uses: actions/upload-artifact@v4
with:
name: linux-deb
path: packages/player/src-tauri/target/release/bundle/deb/*.deb
retention-days: 1
flatpak:
needs: release
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
options: --privileged
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract version from tag
id: version
shell: bash
run: |
VERSION=${GITHUB_REF#refs/tags/player@}
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Download .deb artifact
uses: actions/download-artifact@v4
with:
name: linux-deb
path: flatpak/
- name: Prepare Flatpak build files
shell: bash
run: flatpak/prepare-build.sh flatpak/*.deb
- name: Build Flatpak bundle
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: nuclear-music-player.flatpak
manifest-path: flatpak/com.nuclearplayer.Nuclear.yml
cache-key: flatpak-builder-${{ github.sha }}
- name: Upload Flatpak to GitHub Release
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
gh release upload "player@${{ steps.version.outputs.version }}" \
nuclear-music-player.flatpak \
--clobber