Build on Release (DEPRECATED) #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| - name: Save release notes as file | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const body = context.payload.release.body; | |
| fs.writeFileSync('release-notes.html', body); | |
| - name: Upload build artifacts | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| projects/switch520-auto-secret/dist/** | |
| release-notes.html |