-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (76 loc) · 2.89 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Publish
on:
push:
tags:
- '*'
jobs:
publish:
strategy:
matrix:
include:
- os: macos-latest
server_artifact_name: dist/tales-server.zip
server_asset_name: tales-server-macos-x86_64.zip
desktop_artifact_name: dist/tales-desktop.dmg
desktop_asset_name: tales-desktop-macos-x86_64.dmg
- os: ubuntu-latest
server_artifact_name: dist/tales-server.zip
server_asset_name: tales-server-linux-x86_64.zip
desktop_artifact_name: dist/tales-desktop.AppImage
desktop_asset_name: tales-desktop-linux-x86_64.AppImage
- os: windows-latest
server_artifact_name: dist/tales-server.zip
server_asset_name: tales-server-windows-x86_64.zip
desktop_artifact_name: dist/tales-desktop.exe
desktop_asset_name: tales-desktop-windows-x86_64.exe
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.14.3'
- name: Cache node modules
uses: actions/[email protected]
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}
- run: npm install
- name: Setup keychain
if: matrix.os == 'macos-latest'
run: |
KEYCHAIN_FILE=default.keychain
security create-keychain -p password $KEYCHAIN_FILE
security default-keychain -s $KEYCHAIN_FILE
security unlock-keychain -p password $KEYCHAIN_FILE
security import <(echo $CERTIFICATE_MACOS_APPLICATION | base64 --decode) \
-f pkcs12 \
-k $KEYCHAIN_FILE \
-P "$CERTIFICATE_PASSWORD" \
-T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k password $KEYCHAIN_FILE
env:
CERTIFICATE_MACOS_APPLICATION: ${{ secrets.CERTIFICATE_MACOS_APPLICATION }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
- run: make build
- name: Sign binaries
if: matrix.os == 'macos-latest'
run: |
codesign -s 'Developer ID Application: Synyx GmbH & Co. KG' bin/tales-server
codesign -s 'Developer ID Application: Synyx GmbH & Co. KG' bin/tales-migrate
- run: make dist
- name: Upload server binaries to release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.server_artifact_name }}
asset_name: ${{ matrix.server_asset_name }}
tag: ${{ github.ref }}
- name: Upload desktop binaries to release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.desktop_artifact_name }}
asset_name: ${{ matrix.desktop_asset_name }}
tag: ${{ github.ref }}