Build Canary Release #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/*' |