Skip to content

Commit

Permalink
Updated the build action (#41)
Browse files Browse the repository at this point in the history
* Changed main release action to listed.
* Added unlisted release GitHub action
* Updated the artifact zips for all actions
  • Loading branch information
OhMyGuus authored Sep 25, 2022
1 parent 7e00e2a commit cd9cd76
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 8 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@ jobs:
run: |
cp src/manifest_v3.json src/manifest.json
- name: Archive Release
run: |
7z a 'IDCAC-chrome.zip' -r './src/*'
- uses: actions/upload-artifact@v3
with:
name: IDCAC-chrome
path: 'IDCAC-chrome.zip'
path: ./src/*

- name: Move to manifest v2
run: |
Expand All @@ -35,6 +31,11 @@ jobs:
source: src
filename: "IDCAC.xpi"

- uses: actions/upload-artifact@v3
with:
name: IDCAC-firefox-source
path: ./src/*

- uses: actions/upload-artifact@v3
with:
name: IDCAC-firefox-unsigned
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release extension
name: Release listed

on:
workflow_dispatch:
Expand All @@ -25,7 +25,7 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: IDCAC-chrome
path: 'IDCAC-chrome.zip'
path: ./src/*

- name: Move to manifest v2
run: |
Expand All @@ -45,13 +45,18 @@ jobs:
name: IDCAC-firefox-unsigned
path: ${{ steps.web-ext-build.outputs.target }}

- uses: actions/upload-artifact@v3
with:
name: IDCAC-firefox-source
path: ./src/*

- name: "web-ext sign"
id: web-ext-sign
uses: kewisch/action-web-ext@v1
with:
cmd: sign
source: ${{ steps.web-ext-build.outputs.target }}
channel: unlisted
channel: listed
apiKey: ${{ secrets.AMO_SIGN_KEY }}
apiSecret: ${{ secrets.AMO_SIGN_SECRET }}
timeout: 900000
Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/release_unlisted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Release unlisted

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Generate release tag
id: tag
run: |
echo "::set-output name=release_tag::IDAC_$(date +"%Y.%m.%d_%H-%M")"
- name: Move to manifest v3
run: |
cp src/manifest_v3.json src/manifest.json
- name: Archive Release
run: |
7z a 'IDCAC-chrome.zip' -r './src/*'
- uses: actions/upload-artifact@v3
with:
name: IDCAC-chrome
path: ./src/*

- name: Move to manifest v2
run: |
rm src/manifest.json
cp src/manifest_v2.json src/manifest.json
- name: "web-ext build"
id: web-ext-build
uses: kewisch/action-web-ext@v1
with:
cmd: build
source: src
filename: "IDCAC.xpi"

- uses: actions/upload-artifact@v3
with:
name: IDCAC-firefox-unsigned
path: ${{ steps.web-ext-build.outputs.target }}

- uses: actions/upload-artifact@v3
with:
name: IDCAC-firefox-source
path: ./src/*

- name: "web-ext sign"
id: web-ext-sign
uses: kewisch/action-web-ext@v1
with:
cmd: sign
source: ${{ steps.web-ext-build.outputs.target }}
channel: unlisted
apiKey: ${{ secrets.AMO_SIGN_KEY }}
apiSecret: ${{ secrets.AMO_SIGN_SECRET }}
timeout: 900000

- uses: actions/upload-artifact@v3
with:
name: IDCAC-firefox-signed
path: ${{ steps.web-ext-sign.outputs.target }}

- name: Rename xpi
run: |
mv ${{ steps.web-ext-sign.outputs.target }} IDCAC-firefox.xpi
- name: "Create Release"
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
files: |
IDCAC-chrome.zip
IDCAC-firefox.xpi


0 comments on commit cd9cd76

Please sign in to comment.