chore(release): 1.18.3 #46
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 | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22.x | |
| - name: Write ffalt.github.io app config | |
| run: | | |
| echo "{\"url\": \"https://ffalt.github.io/mah/\", \"name\": \"Mah\", \"title\": \"Mah - Mahjong\", \"category\": \"A Mahjong Solitaire Board Game\", \"description\": \"The original open source version of many Mahjong games out there. Completely free, no ads, no tracking.\", \"kyodai\":true, \"editor\":true}" > custom-build-config.json | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Test | |
| run: npm run test | |
| - name: Build GH Pages release | |
| run: npm run build:deploy-ghpages | |
| - name: Build GH Pages settings | |
| run: touch ./dist/.nojekyll | |
| - name: Deploy to GH Pages branch 🚀 | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: gh-pages | |
| folder: dist | |
| clean: true | |
| - name: Write release app config | |
| run: | | |
| echo "{\"name\": \"Mah\"}" > custom-build-config.json | |
| - name: Build | |
| run: npm run build:deploy-release | |
| - name: Compute version and zip name | |
| id: version | |
| run: | | |
| RAW=${GITHUB_REF_NAME} | |
| VERSION=${RAW#v} | |
| SAFE=${VERSION//./_} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "zip=webapp-mah-$SAFE.zip" >> $GITHUB_OUTPUT | |
| - name: Create release package | |
| run: cd dist && zip -r "./${{ steps.version.outputs.zip }}" . | |
| - name: Generate Releaselog | |
| run: | | |
| npm run build:releaselog | |
| - name: Create release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ github.ref }} | |
| name: Release ${{ github.ref_name }} | |
| bodyFile: ./RELEASELOG.md | |
| draft: false | |
| prerelease: false | |
| artifacts: ./dist/${{ steps.version.outputs.zip }} | |
| artifactContentType: application/zip | |
| makeLatest: true |