Skip to content

Build on Release (DEPRECATED) #5

Build on Release (DEPRECATED)

Build on Release (DEPRECATED) #5

Workflow file for this run

name: Build on Release
permissions:
contents: write
on:
release:
types: [ published ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Install sub-project dependencies
working-directory: projects/switch520-auto-secret
run: npm install
- name: Build project
working-directory: projects/switch520-auto-secret
run: npm run build
# 可选:读取 Release Notes(用于后续 webhook / 发布)
- name: Extract release notes
id: notes
uses: actions/github-script@v7
with:
script: |
const body = context.payload.release.body || '';
core.setOutput('notes', body);
- name: Upload build artifacts
uses: softprops/action-gh-release@v2
with:
files: |
projects/switch520-auto-secret/dist/**