-
Notifications
You must be signed in to change notification settings - Fork 26
155 lines (136 loc) · 5.3 KB
/
build.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
153
154
155
name: Better Hangouts Chat build
run-name: ${{ github.actor }} is building Better Hangouts Chat
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: intall p7zip-full
run: sudo apt-get install git p7zip-full
- name: build and pack
run: "sh -c './generate_patch.sh && ./package_extensions.sh'"
- name: Set current date as env variable
run: echo "NOW=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
- name: Add Firefox Dark Extension ID
run: "sh -c './add_gecko_id.sh out/darktheme/firefox/manifest.json ${{ secrets.FF_DARK_ID }}'"
- name: Add Firefox Light Extension ID
run: "sh -c './add_gecko_id.sh out/lighttheme/firefox/manifest.json ${{ secrets.FF_LIGHT_ID }}'"
- name: Add Firefox Slack Extension ID
run: "sh -c './add_gecko_id.sh out/slacktheme/firefox/manifest.json ${{ secrets.FF_SLACK_ID }}'"
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: true
prerelease: false
release_name: Release ${{ github.ref_name }} - ${{ env.NOW }}
tag_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload chrome light file
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out/lighttheme/chrome-light.zip
asset_name: chrome-better_hangouts_chat_light-${{ github.ref_name }}.zip
asset_content_type: application/zip
- name: upload chrome dark file
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out/darktheme/chrome-dark.zip
asset_name: chrome-better_hangouts_chat_dark-${{ github.ref_name }}.zip
asset_content_type: application/zip
- name: upload chrome slack file
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out/slacktheme/chrome-slack.zip
asset_name: chrome-better_hangouts_chat_slack-${{ github.ref_name }}.zip
asset_content_type: application/zip
- name: "firefox-light web-ext build"
id: ff-build-light
uses: kewisch/action-web-ext@v1
with:
cmd: build
source: out/lighttheme/firefox
- name: "firefox-light web-ext sign"
id: ff-sign-light
uses: kewisch/action-web-ext@v1
with:
cmd: sign
source: ${{ steps.ff-build-light.outputs.target }}
channel: unlisted
apiKey: ${{ secrets.AMO_SIGN_KEY }}
apiSecret: ${{ secrets.AMO_SIGN_SECRET }}
timeout: 900000
- name: upload firefox light file
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.ff-sign-light.outputs.target }}
asset_name: firefox-better_hangouts_chat_light-${{ github.ref_name }}.xpi
asset_content_type: application/zip
- name: "firefox-dark web-ext build"
id: ff-build-dark
uses: kewisch/action-web-ext@v1
with:
cmd: build
source: out/darktheme/firefox
- name: "firefox-dark web-ext sign"
id: ff-sign-dark
uses: kewisch/action-web-ext@v1
with:
cmd: sign
source: ${{ steps.ff-build-dark.outputs.target }}
channel: unlisted
apiKey: ${{ secrets.AMO_SIGN_KEY }}
apiSecret: ${{ secrets.AMO_SIGN_SECRET }}
timeout: 900000
- name: upload firefox dark file
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.ff-sign-dark.outputs.target }}
asset_name: firefox-better_hangouts_chat_dark-${{ github.ref_name }}.xpi
asset_content_type: application/zip
- name: "firefox-slack web-ext build"
id: ff-build-slack
uses: kewisch/action-web-ext@v1
with:
cmd: build
source: out/slacktheme/firefox
- name: "firefox-slack web-ext sign"
id: ff-sign-slack
uses: kewisch/action-web-ext@v1
with:
cmd: sign
source: ${{ steps.ff-build-slack.outputs.target }}
channel: unlisted
apiKey: ${{ secrets.AMO_SIGN_KEY }}
apiSecret: ${{ secrets.AMO_SIGN_SECRET }}
timeout: 900000
- name: upload firefox slack file
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.ff-sign-slack.outputs.target }}
asset_name: firefox-better_hangouts_chat_slack-${{ github.ref_name }}.xpi
asset_content_type: application/zip