2026.5.1 #68
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 builds | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| release: | |
| name: Release builds to GitHub Releases | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build moonlight | |
| env: | |
| NODE_ENV: production | |
| MOONLIGHT_BRANCH: stable | |
| MOONLIGHT_VERSION: ${{ github.ref_name }} | |
| run: | | |
| pnpm run build | |
| pnpm run browser | |
| - name: Separate browser builds | |
| run: | | |
| mv ./dist/browser ./browser | |
| mv ./dist/browser-mv2 ./browser-mv2 | |
| - name: Copy browser's index.js to browser.js | |
| run: | | |
| cp ./browser/index.js ./browser.js | |
| - name: Create archives | |
| run: | | |
| cd ./dist | |
| tar -czf ../dist.tar.gz * | |
| cd ../browser | |
| tar -czf ../browser.tar.gz * | |
| cd ../browser-mv2 | |
| tar -czf ../browser-mv2.tar.gz * | |
| cd .. | |
| - name: Deploy to GitHub | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: "dist.tar.gz,browser.tar.gz,browser-mv2.tar.gz,browser.js" | |
| bodyFile: ./CHANGELOG.md | |
| publish: | |
| name: Publish packages on npm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| registry-url: https://registry.npmjs.org | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Publish packages | |
| run: pnpm publish --provenance --no-git-checks --access public --filter="./packages/{esbuild-config,mappings,types}" |