add gitea action to pack the crome extension
This commit is contained in:
@@ -0,0 +1,41 @@
|
|||||||
|
name: Package Extension
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*.*.*"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
package-extension:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Read extension version
|
||||||
|
id: version
|
||||||
|
run: |
|
||||||
|
version="$(python - <<'PY'
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
manifest = json.loads(Path("extension/manifest.json").read_text())
|
||||||
|
print(manifest["version"])
|
||||||
|
PY
|
||||||
|
)"
|
||||||
|
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Build extension archive
|
||||||
|
run: |
|
||||||
|
mkdir -p dist
|
||||||
|
cd extension
|
||||||
|
zip -r "../dist/browser-cli-extension-v${{ steps.version.outputs.version }}.zip" .
|
||||||
|
|
||||||
|
- name: Upload extension artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: browser-cli-extension-v${{ steps.version.outputs.version }}
|
||||||
|
path: dist/browser-cli-extension-v${{ steps.version.outputs.version }}.zip
|
||||||
|
if-no-files-found: error
|
||||||
Reference in New Issue
Block a user