Closed #65, #86 #46
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: Build release | |
on: | |
push: | |
tags: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
- run: yarn | |
- run: yarn --cwd functions | |
# xpi | |
- run: yarn run build:firefox | |
- run: npx web-ext --config web-ext.config.js sign | |
env: | |
WEB_EXT_API_KEY: ${{ secrets.FIREFOX_API_KEY }} | |
WEB_EXT_API_SECRET: ${{ secrets.FIREFOX_API_SECRET }} | |
# zip | |
- run: yarn run build | |
- run: npx web-ext --config web-ext.config.js build | |
- name: Upload to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: build/* | |
file_glob: true | |
tag: ${{ github.ref }} | |
overwrite: true | |
- run: | | |
export NAME=slyrics-$(node -p "require('./package.json').version") | |
export PATH=build/${NAME} | |
echo "PATH=${PATH}" >> $GITHUB_ENV | |
echo ${PATH} | |
- uses: hocgin/action-edge-addone-upload@main | |
with: | |
product_id: ${{ secrets.EDGE_PRODUCT_ID }} | |
client_id: ${{ secrets.EDGE_CLIENT_ID }} | |
client_secret: ${{ secrets.EDGE_CLIENT_SECRET }} | |
access_token_url: ${{ secrets.EDGE_ACCESS_TOKEN_URL }} | |
addone_file: ${{ env.PATH }}.zip | |
- uses: trmcnvn/chrome-addon@v2 | |
with: | |
extension: mkjfooclbdgjdclepjeepbmmjaclipod | |
zip: ${{ env.PATH }}.zip | |
client-id: ${{ secrets.CHROME_CLIENT_ID }} | |
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }} | |
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }} |