chore: update version #136
Workflow file for this run
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: Chameleon Dev Build | |
on: | |
push: | |
tags: | |
- v**-alpha** | |
- v**-beta** | |
- v**-rc** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
- name: Install NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '14' | |
- name: Build extension | |
run: | | |
npm install | |
npm install --global web-ext | |
npm run build | |
- name: Sign extension | |
run: | | |
web-ext sign -s ./dist --channel unlisted | |
mv ./web-ext-artifacts/$(ls web-ext-artifacts) ./web-ext-artifacts/chameleon_$(git describe --tags).signed.xpi | |
env: | |
WEB_EXT_API_KEY: ${{ secrets.WEBEXT_API_KEY }} | |
WEB_EXT_API_SECRET: ${{ secrets.WEBEXT_API_SECRET }} | |
- name: Generate variables | |
id: chameleon | |
run: | | |
echo ::set-output name=VERSION::$(git describe --tags) | |
echo ::set-output name=FILENAME::chameleon_$(git describe --tags).signed.xpi | |
CHANGELOG=$(python3 ./.github/workflows/dev/chglog.py) | |
CHANGELOG="${CHANGELOG//$'%'/%25}" | |
CHANGELOG="${CHANGELOG//$'\n'/%0A}" | |
CHANGELOG="${CHANGELOG//$'\r'/%0D}" | |
echo ::set-output name=CHANGELOG::$CHANGELOG | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.chameleon.outputs.VERSION }} | |
release_name: Chameleon Dev ${{ steps.chameleon.outputs.VERSION }} | |
body: | | |
${{ steps.chameleon.outputs.CHANGELOG }} | |
draft: false | |
prerelease: true | |
- name: Upload release | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./web-ext-artifacts/${{ steps.chameleon.outputs.FILENAME }} | |
asset_name: ${{ steps.chameleon.outputs.FILENAME }} | |
asset_content_type: application/x-xpinstall |