ringeringeraja33_FederatedE.../.github/workflows/release.yml
2026-07-18 15:01:06 +08:00

39 lines
1,009 B
YAML

name: Release plugin
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v6
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- name: Build and validate
run: |
npm ci
npm run check
- name: Verify tag matches manifest
run: |
test "${GITHUB_REF_NAME}" = "$(node -p "require('./manifest.json').version")"
- name: Attest build provenance
uses: actions/attest@v4
with:
subject-path: |
main.js
manifest.json
styles.css
- name: Create draft release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "${GITHUB_REF_NAME}" --title "${GITHUB_REF_NAME}" --draft main.js manifest.json styles.css