Gitea treats github.* as an alias for gitea.*. The pattern was canaried in this form, and pr-flow only detects a gate written this way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
55 lines
1.7 KiB
YAML
55 lines
1.7 KiB
YAML
name: Firefox Extension CI
|
|
|
|
on:
|
|
pull_request:
|
|
# edited: removing the WIP: prefix starts the real run.
|
|
types: [opened, synchronize, reopened, edited]
|
|
push:
|
|
branches:
|
|
- develop
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
# The gate and concurrency use the github.* context, Gitea's alias for gitea.*:
|
|
# it is the form the pattern was canaried with and the one pr-flow detects.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
# Cancel superseded PR runs, never a push run: main's push uploads the package.
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
validate:
|
|
# WIP gate: skip PRs titled WIP: so early PRs cost no run per push. Gate on
|
|
# the title and nothing else, since a skipped job reports success on the
|
|
# required check (see ~/.claude/docs/gitea-ci-pattern.md).
|
|
if: >-
|
|
github.event_name != 'pull_request' || (
|
|
!startsWith(github.event.pull_request.title, 'WIP:') &&
|
|
!startsWith(github.event.pull_request.title, '[WIP]')
|
|
)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Lint and build
|
|
run: npm test
|
|
|
|
- name: Upload Firefox package
|
|
if: ${{ gitea.event_name == 'push' && gitea.ref == 'refs/heads/main' }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: firefox-extension-${{ gitea.sha }}
|
|
path: web-ext-artifacts/*.zip
|
|
if-no-files-found: error
|
|
retention-days: 30
|