-
Notifications
You must be signed in to change notification settings - Fork 15
46 lines (41 loc) · 1.34 KB
/
publish.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
name: Deploy
on:
release:
types: [released]
jobs:
deploy:
name: Deploy to chrome devconsole
runs-on: ubuntu-latest
steps:
- name: Start deployment
uses: bobheadxi/[email protected]
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: chrome-devconsole
- name: Download assets
env:
FILE_NAME: build.zip
run: |
response=$(curl -sb -H ${{ github.event.release.assets_url }})
url=$(echo $response | jq -r --arg FILE_NAME "$FILE_NAME" '.[] | select(.name==$FILE_NAME) .browser_download_url')
wget $url
- name: Publish to chrome devconsole
uses: Klemensas/chrome-extension-upload-action@master
with:
refresh-token: ${{ secrets.REFRESH_TOKEN }}
client-id: ${{ secrets.CLIENT_ID }}
client-secret: ${{ secrets.CLIENT_SECRET }}
file-name: build.zip
app-id: ${{ secrets.APP_ID }}
publish: true
- name: Update deployment status
uses: bobheadxi/[email protected]
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
env_url: ${{ secrets.WEBSTORE_URL }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}