Updated Github Workflow #36
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 and Release | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run linting | |
| run: npm run lint | |
| - name: Build minified release | |
| run: | | |
| npm run release:minified | |
| zip -r -j static_minified.zip dist/* | |
| - name: Build unminified release | |
| run: | | |
| npm run release:unminified | |
| zip -r -j static_unminified.zip dist/* | |
| - name: Get version | |
| id: version | |
| run: echo "version=v$(./ci/getVersion.sh)" >> $GITHUB_OUTPUT | |
| - name: Verify version | |
| run: ./ci/verifyVersion.sh ${{ steps.version.outputs.version }} | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: ${{ steps.version.outputs.version }} | |
| tag_name: ${{ steps.version.outputs.version }} | |
| files: | | |
| static_minified.zip | |
| static_unminified.zip | |
| fail_on_unmatched_files: true | |
| prerelease: false | |
| draft: false | |
| generate_release_notes: true |