ci: add release workflow
Some checks failed
Build and Sign Extension / build-sign-release (push) Failing after 3s
Some checks failed
Build and Sign Extension / build-sign-release (push) Failing after 3s
This commit is contained in:
parent
4ae6b27809
commit
3aff8dc4d9
3 changed files with 56 additions and 1 deletions
42
.forgejo/workflows/release.yml
Normal file
42
.forgejo/workflows/release.yml
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
name: Build and Sign Extension
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-sign-release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Install Mozilla web-ext CLI
|
||||||
|
run: npm install -g web-ext
|
||||||
|
|
||||||
|
- name: Build and Sign with Mozilla
|
||||||
|
id: sign_extension
|
||||||
|
# web-ext will automatically zip the directory, upload it to Mozilla,
|
||||||
|
# wait for the cryptographic signature, and download the resulting .xpi
|
||||||
|
run: |
|
||||||
|
web-ext sign \
|
||||||
|
--source-dir . \
|
||||||
|
--channel unlisted \
|
||||||
|
--api-key ${{ secrets.AMO_JWT_ISSUER }} \
|
||||||
|
--api-secret ${{ secrets.AMO_JWT_SECRET }} \
|
||||||
|
--artifacts-dir ./web-ext-artifacts \
|
||||||
|
--ignore-files ".forgejo" ".git" "updates.json" "*.md"
|
||||||
|
|
||||||
|
- name: Upload signed XPI to Forgejo Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
# web-ext puts the downloaded file in the artifacts directory
|
||||||
|
files: ./web-ext-artifacts/*.xpi
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
@ -12,7 +12,8 @@
|
||||||
},
|
},
|
||||||
"browser_specific_settings": {
|
"browser_specific_settings": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
"id": "print-picker@yourdomain.com"
|
"id": "print-element-picker@git.depeuter.dev",
|
||||||
|
"update_url": "https://git.depeuter.dev/tdpeuter/tdpeuter/print-element-picker/raw/branch/main/updates.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
12
updates.json
Normal file
12
updates.json
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"addons": {
|
||||||
|
"print-element-picker@git.depeuter.dev": {
|
||||||
|
"updates": [
|
||||||
|
{
|
||||||
|
"version": "0.1",
|
||||||
|
"update_link": "https://git.depeuter.dev/tdpeuter/print-element-picker/releases/download/v0.1/print-element-picker-0.1.xpi"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue