Skip to content

Build Canary Release #48

Build Canary Release

Build Canary Release #48

Workflow file for this run

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/*'