mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 17:30:31 +00:00
62 lines
1.3 KiB
YAML
62 lines
1.3 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*.*.*"
|
|
|
|
permissions:
|
|
contents: write
|
|
id-token: write
|
|
attestations: write
|
|
|
|
jobs:
|
|
release:
|
|
name: Build and release
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Check release version
|
|
run: npm run release:check
|
|
env:
|
|
RELEASE_VERSION: ${{ github.ref_name }}
|
|
|
|
- name: Run checks and build
|
|
run: npm run check
|
|
|
|
- name: Generate artifact attestations
|
|
uses: actions/attest@v4
|
|
with:
|
|
subject-path: |
|
|
main.js
|
|
manifest.json
|
|
styles.css
|
|
|
|
- name: Create GitHub release
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
TAG: ${{ github.ref_name }}
|
|
run: |
|
|
NOTES_ARGS=(--generate-notes)
|
|
NOTES_FILE=".github/release-notes/$TAG.md"
|
|
if [ -f "$NOTES_FILE" ]; then
|
|
NOTES_ARGS=(--notes-file "$NOTES_FILE")
|
|
fi
|
|
|
|
gh release create "$TAG" \
|
|
main.js manifest.json styles.css \
|
|
--title "$TAG" \
|
|
"${NOTES_ARGS[@]}" \
|
|
--verify-tag
|