Fix pipeline #3
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 and Publish Firefox Extension | |
on: | |
push: | |
branches: | |
- main # Change to the branch you want to trigger the action | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: "20" # Use the latest LTS version of Node.js | |
- name: Create extension zip | |
run: zip -r injectooor.zip * -x .git\* -x node_modules\* -x .github\* | |
shell: bash | |
- name: Publish to AMO | |
env: | |
AMO_API_KEY: ${{ secrets.AMO_API_KEY }} | |
AMO_API_SECRET: ${{ secrets.AMO_API_SECRET }} | |
run: | | |
curl -s -o response.json \ | |
-H "Authorization: JWT $(npx --yes jsonwebtoken -k $AMO_API_SECRET -a HS256 --sub $AMO_API_KEY)" \ | |
-F "[email protected]" \ | |
https://addons.mozilla.org/api/v4/addons/@531480d4-0398-499e-bdfc-79e7d6cf0055/versions/ | |
cat response.json | |
shell: bash |