asyouplz_SpeechNote/.github/workflows/release-auto.yml
asyouplz cbdb374e9d
chore(ci): update actions for node 24 runners (#77)
Upgrade the GitHub Actions versions used in CI and release workflows so they run on
Node 24 before the hosted runner default changes.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 00:59:05 +09:00

75 lines
2.1 KiB
YAML

name: Automated Release
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
# Note: issues/pull-requests write permissions removed - not needed for current semantic-release config
jobs:
release:
name: Semantic Release
runs-on: ubuntu-latest
# Skip workflow for semantic-release commits to prevent infinite loops
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
# Generate GitHub App token to bypass repository rulesets
- name: Generate GitHub App Token
id: generate-token
uses: actions/create-github-app-token@v3.0.0-beta.1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run linting
run: npm run lint || true
- name: Run type checking
run: npm run typecheck
- name: Build plugin
run: |
npm run build
npm run build:css
- name: Verify build artifacts
run: |
for file in main.js manifest.json styles.css; do
if [ ! -s "$file" ]; then
echo "❌ $file is missing or empty"
exit 1
fi
done
# Syntax check for main.js
node -c main.js || { echo "❌ main.js has syntax errors"; exit 1; }
# Syntax check for manifest.json
node -e "JSON.parse(require('fs').readFileSync('manifest.json'))" || { echo "❌ manifest.json is invalid JSON"; exit 1; }
echo "✅ All build artifacts present, non-empty, and syntax is valid"
- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
run: npx semantic-release