Fix #12: pin uglify-js (#13) #40
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: CI | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup node.js | |
| uses: actions/setup-node@v4 | |
| - name: Install modules | |
| run: | | |
| mv node_modules/@types . | |
| npm install | |
| mv @types node_modules | |
| - name: Build | |
| run: npm run build | |
| - name: Minify | |
| run: npm run minify | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "OpenRCT2 DevTools" | |
| path: out/devtools.min.js | |
| - name: Get the version | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: echo "version=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV | |
| - name: Create release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: v${{ env.version }} | |
| release_name: Release v${{ env.version }} | |
| prerelease: false | |
| - name: Upload Release Asset | |
| uses: actions/upload-release-asset@v1.0.2 | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: out/devtools.min.js | |
| asset_name: devtools.min.js | |
| asset_content_type: text/javascript |