Skip to content

allow unicode filename & added timestamp to img #151

allow unicode filename & added timestamp to img

allow unicode filename & added timestamp to img #151

Workflow file for this run

name: Build and Publish
on:
push:
branches: [ master, develop ]
env:
MAJOR_VER: 3
MINOR_VER: 0
jobs:
build_chrome:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '16.x'
- run: npm ci
- run: npm run build -- --env=version=$MAJOR_VER.$MINOR_VER.${{ github.run_number }}
- name: Zip chrome
run: zip -qq -r chrome.zip *
working-directory: dist/chrome_prod
- uses: actions/upload-artifact@v4
with:
name: chrome
path: dist/chrome_prod/chrome.zip
build_firefox:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '16.x'
- run: npm ci
- run: npm run build_ff -- --env=version=$MAJOR_VER.$MINOR_VER.${{ github.run_number }}
- name: Zip firefox
run: zip -qq -r firefox.zip *
working-directory: dist/firefox_prod
- uses: actions/upload-artifact@v4
with:
name: firefox
path: dist/firefox_prod/firefox.zip
publish_chrome:
needs: build_chrome
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Download extension
uses: actions/download-artifact@v4
with:
name: chrome
- name: Publish Chrome
uses: maoserr/[email protected]
with:
chrome_extension_id: eopjnahefjhnhfanplcjpbbdkpbagikk
client_id: ${{ secrets.CHROME_CLIENT_ID }}
refresh_token: ${{ secrets.CHROME_REFRESH_TOKEN }}
client_secret: ${{ secrets.CHROME_CLIENT_SECRET }}
file: chrome.zip
publish_firefox:
needs: build_firefox
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- name: Zip source
run: zip -qq -r src.zip *
- name: Download extension
uses: actions/download-artifact@v4
with:
name: firefox
- name: Publish Firefox
uses: maoserr/[email protected]
with:
firefox_extension_id: [email protected]
api_key: ${{ secrets.FIREFOX_API_KEY }}
api_secret: ${{ secrets.FIREFOX_API_SECRET }}
file: firefox.zip
src_file: src.zip
publish_release:
needs: [ build_firefox, build_chrome ]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Download extension
uses: actions/download-artifact@v4
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.MAJOR_VER }}.${{ env.MINOR_VER }}.${{ github.run_number }}
files: |
firefox/firefox.zip
chrome/chrome.zip