Skip to content

Commit 2ed9770

Browse files
committed
Hell yeah
1 parent 65f3232 commit 2ed9770

File tree

3 files changed

+122
-44
lines changed

3 files changed

+122
-44
lines changed

.github/workflows/deploy-firefox.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: Publish
2+
on:
3+
workflow_dispatch
4+
5+
env:
6+
FORCE_COLOR: true
7+
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
15+
- name: Use Python 3.10
16+
uses: actions/setup-python@v5.0.0
17+
with:
18+
python-version: 3.10.11
19+
architecture: x64
20+
21+
- name: Build and pack
22+
run: python3 build.py both
23+
24+
- name: Upload Firefox Artifact
25+
uses: actions/upload-artifact@v2
26+
with:
27+
name: ecsta-firefox.zip
28+
path: dist/ecsta-firefox.zip
29+
30+
- name: Upload Chromium Artifact
31+
uses: actions/upload-artifact@v2
32+
with:
33+
name: ecsta-chromium.zip
34+
path: dist/ecsta-chromium.zip
35+
36+
release:
37+
runs-on: ubuntu-latest
38+
needs: [build]
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@v2
42+
43+
- uses: actions/download-artifact@v2
44+
with:
45+
name: ecsta-chromium.zip
46+
path: release
47+
48+
- uses: actions/download-artifact@v2
49+
with:
50+
name: ecsta-firefox.zip
51+
path: release
52+
53+
- name: get version
54+
id: version
55+
uses: notiz-dev/github-action-json-property@release
56+
with:
57+
path: 'manifest.xpi.json'
58+
prop_path: 'version'
59+
60+
- uses: dev-drprasad/delete-tag-and-release@v0.2.1
61+
with:
62+
delete_release: true
63+
tag_name: ${{steps.version.outputs.prop}}
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
67+
- name: Create the release
68+
uses: softprops/action-gh-release@v1
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
with:
72+
tag_name: ${{steps.version.outputs.prop}}
73+
name: Ecsta - Build ${{steps.version.outputs.prop}}
74+
draft: false
75+
prerelease: false
76+
body_path: .github/release.md
77+
files: |
78+
release/ecsta-chromium.zip
79+
release/ecsta-firefox.zip
80+
upload-xpi:
81+
name: Upload to Mozilla Store
82+
runs-on: ubuntu-latest
83+
needs: [build]
84+
steps:
85+
- uses: actions/download-artifact@v2
86+
with:
87+
name: ecsta-firefox.zip
88+
path: release
89+
90+
- uses: maoserr/firefox_extension_publish@v1.0.4
91+
with:
92+
# Extension ID.
93+
firefox_extension_id: Ecsta@kckarnige.github.io
94+
# API key from Mozilla
95+
api_key: ${{ secrets.JWT_ISSUER }}
96+
# API secret from Mozilla
97+
api_secret: ${{ secrets.JWT_SECRET }}
98+
# Zip file for firefox extension
99+
file: release/ecsta-firefox.zip
100+
101+
upload-crx:
102+
name: Upload to Chrome Web Store
103+
runs-on: ubuntu-latest
104+
env:
105+
EXTENSION_ID: jpdnfbcjclmhlebikidldibdlgjindpl
106+
needs: [build]
107+
steps:
108+
- uses: actions/download-artifact@v2
109+
with:
110+
name: ecsta-chromium.zip
111+
path: release
112+
113+
- uses: maoserr/chrome_extension_publish@v1.0.3
114+
with:
115+
chrome_extension_id: eopjnahefjhnhfanplcjpbbdkpbagikk
116+
client_id: ${{ secrets.CI_GOOGLE_CLIENT_ID }}
117+
refresh_token: ${{ secrets.CI_GOOGLE_REFRESH_TOKEN }}
118+
client_secret: ${{ secrets.CI_GOOGLE_CLIENT_SECRET }}
119+
publish: true
120+
file: release/ecsta-chromium.zip

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Draft Release # Stole this from Oculus Dummy, which stole from ArmCord
1+
name: Test Release
22
on:
33
workflow_dispatch
44

@@ -70,7 +70,7 @@ jobs:
7070
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7171
with:
7272
tag_name: devbuild
73-
name: Ecsta - Test build ${{steps.version.outputs.prop}}
73+
name: Ecsta - Test build ${{ github.sha }}
7474
draft: false
7575
prerelease: true
7676
body_path: .github/release.md

0 commit comments

Comments
 (0)