This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
141 lines (132 loc) · 3.99 KB
/
pipeline.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
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
name: Create installers and draft release
on: push
env:
# fortify-setup package dependency
APP_REPO_FOLDER: ../
# fortify-setup package dependency
RELEASE_FOLDER: ../release
# fortify-setup package dependency
ELECTRON_VERSION: '13.6.9'
# sign-data script dependency
OUTPUT_FOLDER_PATH: ./release
# sign-data script dependency
PRIVATE_KEY_BASE64: ${{ secrets.PRIVATE_KEY_BASE64 }}
# sign-data script dependency
PUBLIC_KEY_BASE64: ${{ secrets.PUBLIC_KEY_BASE64 }}
# fortify-setup clone token
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# actions/create-release dependency
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
checkout:
if: >-
contains(github.event.head_commit.message, '[release]')
runs-on: ubuntu-20.04
steps:
- name: Logging
run: |
echo "Let's create the draft release"
macos:
name: Create macos installer
runs-on: macos-12
needs: [checkout]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
cache: 'yarn'
architecture: ${{ matrix.platform }}
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Prepare app repository
uses: ./.github/actions/prepare-app-repo
- name: Prepare fortify-setup repository
uses: ./.github/actions/prepare-fortify-setup-repo
- name: Create installer
run: yarn --cwd ./fortify-setup build
- name: Sign data
run: yarn sign_data
- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
./release/*.jws
./release/*.pkg
ubuntu:
name: Create ubuntu installer
runs-on: ubuntu-20.04
needs: [checkout]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
cache: 'yarn'
architecture: ${{ matrix.platform }}
- name: Install OS dependencies
run: sudo apt-get install libpcsclite-dev
- name: Prepare app repository
uses: ./.github/actions/prepare-app-repo
- name: Prepare fortify-setup repository
uses: ./.github/actions/prepare-fortify-setup-repo
- name: Create installer
run: yarn --cwd ./fortify-setup build
- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: ./release/*.deb
windows:
name: Create windows installers
runs-on: windows-2019
needs: [checkout]
strategy:
matrix:
platform: [x86, x64]
env:
Platform: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
cache: 'yarn'
architecture: ${{ matrix.platform }}
- name: Setup msbuild
uses: microsoft/setup-msbuild@v1.1
- name: Prepare app repository
uses: ./.github/actions/prepare-app-repo
- name: Prepare fortify-setup repository
uses: ./.github/actions/prepare-fortify-setup-repo
- name: Create installer
run: yarn --cwd ./fortify-setup build
- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: ./release/*.msi
create_release:
name: Prepare and create draft release
runs-on: ubuntu-20.04
needs: [macos, ubuntu, windows]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: artifacts
path: artifacts
- name: Display structure of downloaded files
run: ls -R
working-directory: artifacts
- name: Create draft release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
name: Draft release ${{ github.ref }}
draft: true
prerelease: false
files: artifacts/*