Build release #62
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: 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 | |
| - run: | | |
| export NAME=slyrics-$(node -p "require('./package.json').version") | |
| export DIST_PATH=build/${NAME} | |
| echo "DIST_PATH=${DIST_PATH}" >> $GITHUB_ENV | |
| echo ${DIST_PATH} | |
| # firefox zip | |
| - run: yarn run build:firefox | |
| - run: npx web-ext --config web-ext.config.js build | |
| # # xpi | |
| # - 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 }} | |
| # - uses: wdzeng/firefox-addon@v1 | |
| # with: | |
| # addon-guid: '{d5bcc68d-856a-41e2-8021-d4c51f3b8e4a}' | |
| # xpi-path: ${{ env.DIST_PATH }}.zip | |
| # jwt-issuer: ${{ secrets.FIREFOX_API_KEY }} | |
| # jwt-secret: ${{ secrets.FIREFOX_API_SECRET }} | |
| # chrome 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 | |
| - uses: wdzeng/chrome-extension@v1 | |
| with: | |
| extension-id: mkjfooclbdgjdclepjeepbmmjaclipod | |
| zip-path: ${{ env.DIST_PATH }}.zip | |
| client-id: ${{ secrets.CHROME_CLIENT_ID }} | |
| client-secret: ${{ secrets.CHROME_CLIENT_SECRET }} | |
| refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }} | |
| # https://github.com/wdzeng/edge-addon/issues/16 | |
| - uses: wdzeng/edge-addon@v2 | |
| with: | |
| product-id: aiehldpoaeaidnljjimhbojpblkbembm | |
| zip-path: ${{ env.DIST_PATH }}.zip | |
| client-id: ${{ secrets.EDGE_CLIENT_ID }} | |
| api-key: ${{ secrets.EDGE_CLIENT_SECRET }} |