forked from Vencord/Vesktop
-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (51 loc) · 1.72 KB
/
release.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
name: Release
permissions: write-all
on:
push:
branches:
- main
env:
FORCE_COLOR: true
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build application
run: pnpm build
- name: Run Electron Builder
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
pnpm electron-builder --linux --publish always
else
pnpm electron-builder --win --publish always
fi
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get release tag
id: release_tag
run: |
echo "release_tag=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Upload DevBuild as release
if: github.repository == 'Nexulien/Nexop'
run: |
for file in dist/*; do
gh release upload devbuild "$file" --clobber
done
gh release edit devbuild --title "DevBuild $RELEASE_TAG"
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ env.release_tag }}