-
-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (104 loc) · 3.18 KB
/
deploy.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
name: Publish
on:
workflow_dispatch
env:
FORCE_COLOR: true
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Python 3.10
uses: actions/setup-python@v5.0.0
with:
python-version: 3.10.11
architecture: x64
- name: Build and pack
run: python3 build.py both
- name: Upload Firefox Artifact
uses: actions/upload-artifact@v2
with:
name: ecsta-firefox.zip
path: dist/ecsta-firefox.zip
- name: Upload Chromium Artifact
uses: actions/upload-artifact@v2
with:
name: ecsta-chromium.zip
path: dist/ecsta-chromium.zip
release:
name: Upload to GitHub Releases
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: ecsta-chromium.zip
path: release
- uses: actions/download-artifact@v2
with:
name: ecsta-firefox.zip
path: release
- name: get version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: 'manifest.xpi.json'
prop_path: 'version'
- uses: dev-drprasad/delete-tag-and-release@v0.2.1
with:
delete_release: true
tag_name: ${{steps.version.outputs.prop}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create the release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{steps.version.outputs.prop}}
name: Ecsta - Build ${{steps.version.outputs.prop}}
draft: false
prerelease: false
body_path: .github/release.md
files: |
release/ecsta-chromium.zip
release/ecsta-firefox.zip
upload-xpi:
name: Upload to Mozilla Store
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/download-artifact@v2
with:
name: ecsta-firefox.zip
path: release
- uses: maoserr/firefox_extension_publish@v1.0.4
with:
# Extension ID.
firefox_extension_id: Ecsta@kckarnige.github.io
# API key from Mozilla
api_key: ${{ secrets.JWT_ISSUER }}
# API secret from Mozilla
api_secret: ${{ secrets.JWT_SECRET }}
# Zip file for firefox extension
file: release/ecsta-firefox.zip
upload-crx:
name: Upload to Chrome Web Store
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/download-artifact@v2
with:
name: ecsta-chromium.zip
path: release
- uses: maoserr/chrome_extension_publish@v1.0.3
with:
chrome_extension_id: jpdnfbcjclmhlebikidldibdlgjindpl
client_id: ${{ secrets.CI_GOOGLE_CLIENT_ID }}
refresh_token: ${{ secrets.CI_GOOGLE_REFRESH_TOKEN }}
client_secret: ${{ secrets.CI_GOOGLE_CLIENT_SECRET }}
publish: true
file: release/ecsta-chromium.zip