-
-
Notifications
You must be signed in to change notification settings - Fork 3
105 lines (103 loc) · 3.6 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
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
name: Package and Release
on:
push:
tags:
- v*
jobs:
test:
name: Lint and Test
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- run: pnpm install
- name: Lint JS
run: pnpm lint:js
- name: Lint HBS
run: pnpm lint:hbs
- name: Get xvfb
run: sudo apt-get install xvfb
- name: Browser Test
run: pnpm test:ember
- name: Electron Test
run: xvfb-run --auto-servernum pnpm test:electron
build:
name: Build (${{ matrix.os }})
if: startsWith(github.ref, 'refs/tags/')
needs: test
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os: [macos-latest, ubuntu-22.04, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- run: pnpm install
- name: Add macOS certs
if: startsWith(matrix.os, 'macos') && startsWith(github.ref, 'refs/tags/')
run: chmod +x add-osx-cert.sh && ./add-osx-cert.sh
env:
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
- name: Add Windows certificate
if: matrix.os == 'windows-latest' && startsWith(github.ref, 'refs/tags/')
id: write_file
uses: timheuer/base64-to-file@v1
with:
fileName: 'win-certificate.pfx'
encodedString: ${{ secrets.CERTIFICATE_WINDOWS_PFX }}
- name: Setup LXD
if: matrix.os == 'ubuntu-22.04' && startsWith(github.ref, 'refs/tags/')
uses: canonical/[email protected]
- name: Install Snapcraft
if: matrix.os == 'ubuntu-22.04' && startsWith(github.ref, 'refs/tags/')
uses: samuelmeuli/action-snapcraft@v2
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.snapcraft_token }}
- name: Make
if: startsWith(github.ref, 'refs/tags/')
run: pnpm make --publish
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
WINDOWS_PFX_FILE: ${{ steps.write_file.outputs.filePath }}
WINDOWS_PFX_PASSWORD: ${{ secrets.WINDOWS_PFX_PASSWORD }}
# - name: Make Apple arm64
# if: matrix.os == 'macos-11.0' && startsWith(github.ref, 'refs/tags/')
# run: pnpm make --arch=arm64
# env:
# APPLE_ID: ${{ secrets.APPLE_ID }}
# APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD_ARM }}
- name: GitHub release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
electron-app/out/**/*.deb
electron-app/out/**/*.dmg
electron-app/out/**/*Setup.exe
electron-app/out/**/*.rpm
electron-app/out/**/*.zip
- name: Create a Sentry.io release
uses: tclindner/[email protected]
if: matrix.os == 'ubuntu-22.04'
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ship-shape-consulting-llc
SENTRY_PROJECT: swach
with:
tagName: ${{ github.ref }}
environment: production
sourceMapOptions: '{"include": ["electron-app/ember-dist/assets"], "urlPrefix": "~/ember-dist/assets"}'