-
Notifications
You must be signed in to change notification settings - Fork 102
118 lines (98 loc) · 3 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
name: Release listed
on:
workflow_dispatch:
push:
tags:
- "v*.*.*"
- "V*.*.*"
jobs:
release-chrome:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Move to manifest v3
run: |
cp src/manifest_v3.json src/manifest.json
- name: Clear hotreload
run: |
echo "" > src/data/hotreload.js
- name: Archive Release
run: |
7z a 'ISDCAC-chrome-source.zip' -r './src/*'
- uses: actions/upload-artifact@v3
with:
name: ISDCAC-chrome
path: ./src/*
- name: Upload & release
uses: mnao305/[email protected]
with:
file-path: ISDCAC-chrome-source.zip
extension-id: hogefuga(extension id)
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
- name: "Create Release"
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
files: |
ISDCAC-chrome-source.zip
release-firefox:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Move to manifest v2
run: |
cp src/manifest_v2.json src/manifest.json
- name: Clear hotreload
run: |
echo "" > src/data/hotreload.js
- name: "web-ext build"
id: web-ext-build
uses: kewisch/action-web-ext@v1
with:
cmd: build
source: src
filename: "ISDCAC.xpi"
- uses: actions/upload-artifact@v3
with:
name: ISDCAC-firefox-unsigned
path: ${{ steps.web-ext-build.outputs.target }}
- uses: actions/upload-artifact@v3
with:
name: ISDCAC-firefox-source
path: ./src/*
- name: "web-ext sign"
id: web-ext-sign
uses: kewisch/action-web-ext@v1
with:
cmd: sign
source: ${{ steps.web-ext-build.outputs.target }}
channel: listed
apiKey: ${{ secrets.AMO_SIGN_KEY }}
apiSecret: ${{ secrets.AMO_SIGN_SECRET }}
timeout: 900000
- name: Sleep for 15 minutes
run: sleep 15m
shell: bash
- name: Download xpi
run: |
wget https://addons.mozilla.org/firefox/downloads/latest/istilldontcareaboutcookies/istilldontcareaboutcookies-latest.xpi --trust-server-names
- uses: actions/upload-artifact@v3
with:
name: ISDCAC-firefox-signed
path: istilldontcareaboutcookies-*.xpi
- name: Rename source xpi
run: |
mv ${{ steps.web-ext-build.outputs.target }} ISDCAC-firefox-source.zip
- name: "Create Release"
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
files: |
ISDCAC-firefox-source.zip
istilldontcareaboutcookies-*.xpi