v0.4.7 #25
Workflow file for this run
This file contains hidden or 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: BlockTube release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| permissions: | |
| contents: write | |
| name: Build packages | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: '16' | |
| - name: Install Global Dependencies | |
| run: npm -g install terser | |
| - name: Clone repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set variables | |
| run: | | |
| VER=v$(cat VERSION) | |
| echo "VERSION=$VER" >> $GITHUB_ENV | |
| - name: Create GitHub release | |
| id: create_release | |
| uses: ncipollo/release-action@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| tag: ${{ env.VERSION }} | |
| name: ${{ env.VERSION }} | |
| allowUpdates: true | |
| - name: Build packages | |
| run: | | |
| ./tools/build.sh firefox_selfhosted | |
| ./tools/build.sh chrome | |
| - name: Upload Chromium package | |
| uses: shogo82148/actions-upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: dist/chrome/blocktube_chrome_${{ env.VERSION }}.zip | |
| asset_name: blocktube_chrome_${{ env.VERSION }}.zip | |
| asset_content_type: application/octet-stream | |
| - name: Upload Firefox package | |
| id: ff_selfhosted_release | |
| uses: shogo82148/actions-upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: dist/firefox_selfhosted/blocktube_firefox_selfhosted_${{ env.VERSION }}.zip | |
| asset_name: blocktube_firefox_selfhosted.xpi | |
| asset_content_type: application/octet-stream | |
| - name: Update Firefox self hosted manifest | |
| run: | | |
| git checkout master | |
| ./tools/build_ff_update_manifest.py ${{ env.VERSION }} \ | |
| ${{ steps.ff_selfhosted_release.outputs.browser_download_url }} \ | |
| $(sha512sum ./dist/firefox_selfhosted/blocktube_firefox_selfhosted_${{ env.VERSION }}.zip | awk '{print "sha512:"$1}') | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add .updates/ff/updates.json | |
| git commit -m "Update Firefox self hosted manifest to version ${{ env.VERSION }}" | |
| git push -u origin master |