-
Notifications
You must be signed in to change notification settings - Fork 850
82 lines (69 loc) · 2.54 KB
/
build_canary.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
name: Build Canary Release
on:
workflow_dispatch:
schedule:
- cron: '0 20 1,15 * *'
jobs:
action:
uses: ./.github/workflows/build_action.yml
with:
ref: 'dev'
build_xpi: true
secrets: inherit
canary:
runs-on: ubuntu-latest
needs: action
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@master
with:
ref: 'dev'
fetch-depth: 0
- name: Checkout gh-pages
uses: actions/checkout@master
with:
ref: 'gh-pages'
path: 'pages'
- name: Prepare Release
run: mkdir build
- name: Get And rename Zip build
uses: actions/download-artifact@v4
with:
name: dev-build-${{ needs.action.outputs.version }}-zip
- run: mv extension.zip build/PT-Plugin-Plus-${{ needs.action.outputs.version }}.zip
- name: Get And remove Crx Build
uses: actions/download-artifact@v4
with:
name:
dev-build-${{ needs.action.outputs.version }}-crx
- run: |
mv canary.xml pages/update/canary.xml -f
mv extension.crx build/PT-Plugin-Plus-${{ needs.action.outputs.version }}.crx
- name: Get And move Xpi Build
uses: actions/download-artifact@v4
if: ${{ needs.action.outputs.buildXPI == 'success' }}
with:
name: dev-build-${{ needs.action.outputs.version }}-xpi
- if: ${{ needs.action.outputs.buildXPI == 'success' }}
run: |
mv extension.signed.xpi build/PT-Plugin-Plus-${{ needs.action.outputs.version }}.xpi
echo $(jq '.addons[].updates += [{"version": "${{ needs.action.outputs.version }}", "update_link": "https://github.com/pt-plugins/PT-Plugin-Plus/releases/download/v${{ needs.action.outputs.version }}/PT-Plugin-Plus-${{ needs.action.outputs.version }}.xpi"}]' pages/update/firefox.json) > pages/update/firefox.json
- name: Deploy update xml and json
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./pages
commit_message: deploy ${{ github.ref }}
force_orphan: true
user_name: github-actions[bot]
user_email: github-actions[bot]@users.noreply.github.com
- uses: ncipollo/release-action@v1
with:
name: v${{ needs.action.outputs.version }}
tag: v${{ needs.action.outputs.version }}
commit: 'dev'
generateReleaseNotes: true
prerelease: true
artifacts: 'build/*'