Compare commits
7 Commits
v5.0.0-alp
...
v5.0.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
42796684d7
|
|||
|
2871530da2
|
|||
|
f30d299071
|
|||
|
028a803447
|
|||
|
d3c611974f
|
|||
|
b8577b4bac
|
|||
|
b705e34086
|
@@ -6,31 +6,50 @@ on:
|
||||
- v**
|
||||
|
||||
jobs:
|
||||
webext-build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: node:24
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
run: cd web-extension/cl && npm install
|
||||
- name: Build and sign web extension
|
||||
env:
|
||||
AMO_API_KEY: ${{ secrets.AMO_API_KEY }}
|
||||
AMO_API_SECRET: ${{ secrets.AMO_API_SECRET }}
|
||||
run: cd web-extension/cl && npm run sign
|
||||
- name: Upload web extension artifact
|
||||
uses: https://github.com/actions/upload-artifact@v4
|
||||
with:
|
||||
name: webext-xpi
|
||||
path: web-extension/cl/web-ext-artifacts/*.xpi
|
||||
if-no-files-found: error
|
||||
|
||||
build-and-release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [webext-build]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
- name: Install rust toolchain
|
||||
uses: https://github.com/dtolnay/rust-toolchain@stable
|
||||
- name: Build binaries
|
||||
run: cargo build --release
|
||||
- name: Install cargo-deb
|
||||
run: cargo install cargo-deb
|
||||
run: cargo install --quiet cargo-deb
|
||||
- name: Build Debian package
|
||||
run: cargo deb
|
||||
run: cargo deb --quiet
|
||||
- name: Upload Debian package to Gitea registry
|
||||
env:
|
||||
GITEA_SERVER_URL: "https://gitea.champs-libres.be"
|
||||
GITEA_OWNER: ${{ secrets.GITEA_OWNER }}
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
GITEA_OWNER: ${{ vars.PUBLISH_USERNAME }}
|
||||
GITEA_SERVER_URL: ${{ github.server_url }}
|
||||
GITEA_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
|
||||
DEB_DISTRIBUTIONS: noble,plucky,questing
|
||||
DEB_COMPONENT: main
|
||||
DEB_ARCH: amd64
|
||||
run: |
|
||||
set -euo pipefail
|
||||
DEB_FILE=$(ls target/debian/*.deb | head -n1)
|
||||
env
|
||||
if [ -z "${DEB_FILE}" ]; then
|
||||
echo "No .deb file found in target/debian" >&2
|
||||
exit 1
|
||||
@@ -40,15 +59,15 @@ jobs:
|
||||
for DISTRO in "${DISTROS[@]}"; do
|
||||
echo "Uploading ${DEB_FILE} to ${GITEA_SERVER_URL} for owner ${GITEA_OWNER}"
|
||||
curl -sSf -X PUT \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
--upload-file @"${DEB_FILE}" \
|
||||
--user "${GITEA_OWNER}:${GITEA_TOKEN}" \
|
||||
--upload-file "${DEB_FILE}" \
|
||||
"${GITEA_SERVER_URL}/api/packages/${GITEA_OWNER}/debian/pool/${DISTRO}/main/upload"
|
||||
done
|
||||
- name: Read release content
|
||||
uses: https://github.com/jaywcjlove/github-action-read-file@main
|
||||
id: read_release
|
||||
- name: Download web extension artifact
|
||||
uses: https://github.com/actions/download-artifact@v4
|
||||
with:
|
||||
path: .changes/${{ github.ref_name }}.md
|
||||
name: webext-xpi
|
||||
path: web-extension/cl/web-ext-artifacts
|
||||
- name: Release
|
||||
uses: https://gitea.com/akkuman/gitea-release-action@v1
|
||||
env:
|
||||
@@ -56,6 +75,9 @@ jobs:
|
||||
with:
|
||||
files: |-
|
||||
config.toml.dist
|
||||
web-extension/cl/web-ext-artifacts/*.xpi
|
||||
md5sum: true
|
||||
sha256sum: true
|
||||
body_path: .changes/${{ github.ref_name }}.md
|
||||
body: Test release
|
||||
prerelease: true
|
||||
#body_path: .changes/${{ github.ref_name }}.md
|
||||
|
||||
3
web-extension/cl/.web-extension-id
Normal file
3
web-extension/cl/.web-extension-id
Normal file
@@ -0,0 +1,3 @@
|
||||
# This file was created by https://github.com/mozilla/web-ext
|
||||
# Your auto-generated extension ID for addons.mozilla.org is:
|
||||
helper@champs-libres-coop
|
||||
@@ -5,7 +5,10 @@
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "helper@champs-libres-coop",
|
||||
"strict_min_version": "143.0"
|
||||
"strict_min_version": "143.0",
|
||||
"data_collection_permissions": {
|
||||
"required": ["none"]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"check": "tsc --noEmit",
|
||||
"build": "tsc",
|
||||
"package": "tsc && web-ext build --overwrite-dest"
|
||||
"package": "tsc && web-ext build --overwrite-dest",
|
||||
"sign": "tsc && web-ext build --overwrite-dest && web-ext sign --use-submission-api --api-key $AMO_API_KEY --api-secret $AMO_API_SECRET --channel unlisted"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
||||
Reference in New Issue
Block a user