v2.0.0 #2
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: Release Embedded Build | |
| on: | |
| release: | |
| types: [created] | |
| workflow_dispatch: | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build embedded | |
| run: npm run build-embedded | |
| - name: Remove source maps | |
| run: find dist-embedded -name "*.map" -type f -delete | |
| - name: Create zip file | |
| run: | | |
| cd dist-embedded | |
| zip -r ../dist-embedded.zip . -x embedded.html | |
| cd .. | |
| - name: Upload release asset | |
| uses: softprops/action-gh-release@v1 | |
| if: github.event_name == 'release' | |
| with: | |
| files: dist-embedded.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload artifact (for workflow_dispatch) | |
| if: github.event_name == 'workflow_dispatch' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-embedded | |
| path: dist-embedded.zip |