-
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (62 loc) · 2.4 KB
/
publish.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
66
67
68
69
70
71
72
73
name: Publish
on:
push:
tags: ['*']
jobs:
publish:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
- name: Cache node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json')}}
- name: Get tag
uses: olegtarasov/[email protected]
id: tagName
- name: Show version
run: echo "Next Version is ${{ steps.tagName.outputs.tag }} (ref_name ${{ github.ref_name }}; ref ${{ github.ref }})"
- name: Delete outdated drafts
uses: hugo19941994/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build Electron App
uses: Yan-Jobs/[email protected]
id: build-and-release
env:
MAIN_VITE_APP_VERSION: ${{steps.tagName.outputs.tag}}
RENDERER_VITE_APP_VERSION: ${{steps.tagName.outputs.tag}}
MAIN_VITE_API: ${{secrets.MAIN_VITE_API}}
MAIN_VITE_TOKEN: ${{secrets.MAIN_VITE_TOKEN}}
MAIN_VITE_BUGSNAG: ${{secrets.MAIN_VITE_BUGSNAG}}
MAIN_VITE_PAT: ${{secrets.MAIN_VITE_PAT}}
RENDERER_VITE_BUGSNAG: ${{secrets.RENDERER_VITE_BUGSNAG}}
MAIN_VITE_NODE_ENV: production
RENDERER_VITE_NODE_ENV: production
APPLE_ID: ${{ secrets.APPLEID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLEIDPASS }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLEIDPASS }}
TEAM_ID: ${{ secrets.APPLEIDTEAM }}
with:
max_attempts: 3
github_token: ${{ secrets.github_token }}
release: true
# signing certificate for Windows
# windows_certs: {{ secrets.CERTIFICATE_WINDOWS_APPLICATION }}
# windows_certs_password: {{ secrets.CERTIFICATE_WINDOWS_PASSWORD }}
# signing certificate for macOS
mac_certs: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
mac_certs_password: ${{ secrets.CERTIFICATE_OSX_PASSWORD }}
- name: Delete tag for failed release
if: steps.build-and-release.outcome == 'failure'
run: git push --delete origin v${{ steps.tagName.outputs.tag }}```