From 0d9bf09368d568c2cfb2872fa448830eaa7824c3 Mon Sep 17 00:00:00 2001 From: Miguel Pimentel Date: Thu, 25 Apr 2024 14:53:16 -0500 Subject: [PATCH] new workflow --- .../workflows/publish-new-addon-version.yml | 4 +- .github/workflows/web-ext-workflow.yml | 59 +++++++++++++++++++ 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/web-ext-workflow.yml diff --git a/.github/workflows/publish-new-addon-version.yml b/.github/workflows/publish-new-addon-version.yml index e67ee36..8caf54a 100644 --- a/.github/workflows/publish-new-addon-version.yml +++ b/.github/workflows/publish-new-addon-version.yml @@ -2,8 +2,8 @@ name: Publish new Firefox Add-on version on: workflow_dispatch: # Trigger workflow manually - release: - types: [published] # Trigger when a new release is published + # release: + # types: [published] # Trigger when a new release is published permissions: contents: read diff --git a/.github/workflows/web-ext-workflow.yml b/.github/workflows/web-ext-workflow.yml new file mode 100644 index 0000000..a224877 --- /dev/null +++ b/.github/workflows/web-ext-workflow.yml @@ -0,0 +1,59 @@ +name: "Release" + +on: + workflow_dispatch: + push: + tags: + - "v*.*.*" + release: + types: [published] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: "web-ext build" + id: web-ext-build + uses: kewisch/action-web-ext@v1 + with: + cmd: build + filename: "{name}-{version}.xpi" + # ignoreFiles: '[ "package.json","package-lock.json","yarn.lock", ".github", ".gitattributes", "LICENSE", "README.md" ]' + ignoreFiles: | + - package.json + - package-lock.json + - yarn.lock + - .github + - .gitattributes + - LICENSE + - README.md + + - name: "web-ext sign" + id: web-ext-sign + uses: kewisch/action-web-ext@v1 + with: + cmd: sign + channel: listed + source: ${{ steps.web-ext-build.outputs.target }} + apiKey: ${{ secrets.FIREFOX_JWT_ISSUER }} + apiSecret: ${{ secrets.FIREFOX_JWT_SECRET }} + timeout: 900000 + + # - name: "Upload Artifact" + # uses: actions/upload-artifact@v3 + # with: + # name: target.xpi + # path: ${{ steps.web-ext-build.outputs.target }} + + - name: "Create Release" + uses: softprops/action-gh-release@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + files: ${{ steps.web-ext-sign.outputs.target }}