-
Notifications
You must be signed in to change notification settings - Fork 64
152 lines (147 loc) · 5.17 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
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
142
143
144
145
146
147
148
149
150
151
152
name: Release
on:
push:
tags:
- 'v*'
jobs:
createrelease:
name: Create release tag and JBrowse web release artifacts
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
# This allows us to manually edit the release body text before publishing
draft: true
prerelease: false
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Install deps
run: yarn
- name: Build project
run: |
echo $RELEASE_VERSION
cd products/jbrowse-web/
NODE_OPTIONS='--max-old-space-size=6500' yarn build
cd build
zip -r "jbrowse-web-${RELEASE_VERSION}.zip" .
- name: Upload jbrowse-web build
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./products/jbrowse-web/build/jbrowse-web-${{env.RELEASE_VERSION}}.zip
asset_name: jbrowse-web-${{env.RELEASE_VERSION}}.zip
asset_content_type: application/zip
buildwindows:
needs: createrelease
name: Build Windows desktop app
runs-on: ubuntu-latest
container:
image: docker://node:22-bullseye
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install deps (with cache)
uses: bahmutov/npm-install@v1
- name: Setup java
uses: actions/setup-java@v4
with:
# eclipse 'temurin' openjdk https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Selecting-a-Java-distribution
distribution: 'temurin'
java-version: '21'
- name: Install wine
# https://wiki.debian.org/Wine
run: |
dpkg --add-architecture i386
apt update
apt install --yes wine wine32 wine64 libwine libwine:i386 fonts-wine
- name: Install build deps
run: |
apt install --yes python3 make gcc libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
# We are just cloning the esigner repo instead of calling their github
# action directly https://github.com/SSLcom/esigner-codesign
- name: Get ssl.com esigner zip file and unzip
run: |
mkdir products/jbrowse-desktop/code_signer
cd products/jbrowse-desktop/code_signer
wget https://www.ssl.com/download/codesigntool-for-linux-and-macos -O out.zip
unzip out.zip
chmod +x CodeSignTool.sh
cd ../../../
- name: Build app
env:
WINDOWS_SIGN_USER_NAME: ${{ secrets.WINDOWS_SIGN_USER_NAME }}
WINDOWS_SIGN_USER_PASSWORD: ${{ secrets.WINDOWS_SIGN_USER_PASSWORD }}
WINDOWS_SIGN_CREDENTIAL_ID: ${{ secrets.WINDOWS_SIGN_CREDENTIAL_ID }}
WINDOWS_SIGN_USER_TOTP: ${{ secrets.WINDOWS_SIGN_USER_TOTP }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
chown --recursive root:root /github/home
yarn build-electron:win --publish always
working-directory: products/jbrowse-desktop
buildmac:
needs: createrelease
name: Build Mac desktop app
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install build deps
run: |
brew install pkg-config cairo pango libpng jpeg giflib librsvg
- name: Install deps (with cache)
uses: bahmutov/npm-install@v1
- name: Build app
env:
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
APPLEID: ${{ secrets.APPLEID }}
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn build-electron:mac --publish always
working-directory: products/jbrowse-desktop
buildlinux:
needs: createrelease
name: Build Linux desktop app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install deps (with cache)
uses: bahmutov/npm-install@v1
- name: Install build deps
run: |
sudo apt install -y python3 make gcc libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- name: Build app
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn build-electron:linux --publish always
working-directory: products/jbrowse-desktop