Files
gq-to-org-redirector/.gitea/workflows/build.yaml
T
m4xx1m 9113ed8ab1
Build & Package Extension / build (push) Successful in 11s
feat: add CRX3 packaging via private key secret, bump v1.0.1
2026-10-10 17:58:01 +03:00

45 lines
1.2 KiB
YAML

name: Build & Package Extension
on:
push:
branches:
- main
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Package Extension
env:
CRX_KEY: ${{ secrets.CRX_PRIVATE_KEY }}
run: |
mkdir -p dist
if [ -n "$CRX_KEY" ]; then
printf "%s\n" "$CRX_KEY" > /tmp/key.pem
npx -y crx3 -p /tmp/key.pem -o dist/gq-to-org-redirector.crx -z dist/gq-to-org-redirector.zip manifest.json rules.json
rm -f /tmp/key.pem
else
echo "::warning::CRX_PRIVATE_KEY secret is not set, generating ephemeral key"
npx -y crx3 -o dist/gq-to-org-redirector.crx -z dist/gq-to-org-redirector.zip manifest.json rules.json
fi
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: gq-to-org-redirector
path: dist/
- name: Publish Release
if: startsWith(github.ref, 'refs/tags/v')
uses: akkuman/gitea-release-action@v1
with:
files: |
dist/gq-to-org-redirector.crx
dist/gq-to-org-redirector.zip
name: Release ${{ github.ref_name }}