Compare commits
8 Commits
v5.0.0-alp
...
v5.0.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
5dd39d8019
|
|||
|
a4c071b555
|
|||
|
3fb120f8a4
|
|||
|
f524dbfea8
|
|||
|
42796684d7
|
|||
|
2871530da2
|
|||
|
f30d299071
|
|||
|
028a803447
|
@@ -6,8 +6,31 @@ on:
|
|||||||
- v**
|
- v**
|
||||||
|
|
||||||
jobs:
|
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@v3
|
||||||
|
with:
|
||||||
|
name: webext-xpi
|
||||||
|
path: web-extension/cl/web-ext-artifacts/*.xpi
|
||||||
|
retention-days: 7
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
build-and-release:
|
build-and-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: [webext-build]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
@@ -16,18 +39,18 @@ jobs:
|
|||||||
- name: Install cargo-deb
|
- name: Install cargo-deb
|
||||||
run: cargo install --quiet cargo-deb
|
run: cargo install --quiet cargo-deb
|
||||||
- name: Build Debian package
|
- name: Build Debian package
|
||||||
run: cargo deb
|
run: cargo deb --quiet
|
||||||
- name: Upload Debian package to Gitea registry
|
- name: Upload Debian package to Gitea registry
|
||||||
env:
|
env:
|
||||||
GITEA_OWNER: ${{ github.repository_owner }}
|
GITEA_OWNER: ${{ vars.PUBLISH_USERNAME }}
|
||||||
GITEA_SERVER_URL: ${{ github.server_url }}
|
GITEA_SERVER_URL: ${{ github.server_url }}
|
||||||
|
GITEA_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
|
||||||
DEB_DISTRIBUTIONS: noble,plucky,questing
|
DEB_DISTRIBUTIONS: noble,plucky,questing
|
||||||
DEB_COMPONENT: main
|
DEB_COMPONENT: main
|
||||||
DEB_ARCH: amd64
|
DEB_ARCH: amd64
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
DEB_FILE=$(ls target/debian/*.deb | head -n1)
|
DEB_FILE=$(ls target/debian/*.deb | head -n1)
|
||||||
env
|
|
||||||
if [ -z "${DEB_FILE}" ]; then
|
if [ -z "${DEB_FILE}" ]; then
|
||||||
echo "No .deb file found in target/debian" >&2
|
echo "No .deb file found in target/debian" >&2
|
||||||
exit 1
|
exit 1
|
||||||
@@ -41,11 +64,11 @@ jobs:
|
|||||||
--upload-file "${DEB_FILE}" \
|
--upload-file "${DEB_FILE}" \
|
||||||
"${GITEA_SERVER_URL}/api/packages/${GITEA_OWNER}/debian/pool/${DISTRO}/main/upload"
|
"${GITEA_SERVER_URL}/api/packages/${GITEA_OWNER}/debian/pool/${DISTRO}/main/upload"
|
||||||
done
|
done
|
||||||
- name: Read release content
|
- name: Download web extension artifact
|
||||||
uses: https://github.com/jaywcjlove/github-action-read-file@main
|
uses: https://github.com/actions/download-artifact@v3
|
||||||
id: read_release
|
|
||||||
with:
|
with:
|
||||||
path: .changes/${{ github.ref_name }}.md
|
name: webext-xpi
|
||||||
|
path: web-extension/cl/web-ext-artifacts
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: https://gitea.com/akkuman/gitea-release-action@v1
|
uses: https://gitea.com/akkuman/gitea-release-action@v1
|
||||||
env:
|
env:
|
||||||
@@ -53,6 +76,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
files: |-
|
files: |-
|
||||||
config.toml.dist
|
config.toml.dist
|
||||||
|
web-extension/cl/web-ext-artifacts/*.xpi
|
||||||
md5sum: true
|
md5sum: true
|
||||||
sha256sum: true
|
sha256sum: true
|
||||||
body_path: .changes/${{ github.ref_name }}.md
|
body: Test release
|
||||||
|
prerelease: true
|
||||||
|
#body_path: .changes/${{ github.ref_name }}.md
|
||||||
|
|||||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -174,7 +174,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cl-cli"
|
name = "cl-cli"
|
||||||
version = "0.4.1"
|
version = "0.5.0-alpha12"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"gitlab",
|
"gitlab",
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cl-cli"
|
name = "cl-cli"
|
||||||
version = "0.4.1"
|
version = "0.5.0-alpha12"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
license = "GPLv3"
|
||||||
|
description = "Some helpers scripts for Champs-Libres"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
@@ -16,7 +18,7 @@ path="src/webext.rs"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.1.13", features = ["derive"] }
|
clap = { version = "4.1.13", features = ["derive"] }
|
||||||
gitlab = "0.1804.0"
|
gitlab = "0.1804.0"
|
||||||
reqwest = "0.12.24"
|
reqwest = { version = "0.12.24", features = ["rustls-tls"] }
|
||||||
serde = { version = "1.0.228", features = ["derive"] }
|
serde = { version = "1.0.228", features = ["derive"] }
|
||||||
toml = "0.9.8"
|
toml = "0.9.8"
|
||||||
url = "2.5.7"
|
url = "2.5.7"
|
||||||
|
|||||||
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": {
|
"browser_specific_settings": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
"id": "helper@champs-libres-coop",
|
"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",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"check": "tsc --noEmit",
|
"check": "tsc --noEmit",
|
||||||
"build": "tsc",
|
"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": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user