Merge pull request #84 from lightningpixel/release/v0.3.0 #8
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*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| # ─── Create a single release ──────────────────────────────────────────────── | |
| create-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Create release | |
| run: | | |
| gh release create ${{ github.ref_name }} \ | |
| --title "Modly Beta ${{ github.ref_name }}" \ | |
| --generate-notes \ | |
| --latest \ | |
| --repo ${{ github.repository }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # ─── Windows build ──────────────────────────────────────────────────────────── | |
| build-windows: | |
| needs: create-release | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Download Python embed | |
| run: node scripts/download-python-embed.js | |
| - name: Build & Package (Windows) | |
| shell: bash | |
| run: npx electron-vite build && npx electron-builder --win --publish never | |
| env: | |
| CSC_IDENTITY_AUTO_DISCOVERY: false | |
| - name: Upload assets to release | |
| shell: bash | |
| run: | | |
| gh release upload ${{ github.ref_name }} \ | |
| dist/*.exe \ | |
| dist/*.exe.blockmap \ | |
| dist/latest.yml \ | |
| --repo ${{ github.repository }} \ | |
| --clobber | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # ─── Linux build ───────────────────────────────────────────────────────────── | |
| build-linux: | |
| needs: create-release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build & Package (Linux) | |
| run: npx electron-vite build && npx electron-builder --linux --publish never | |
| - name: Upload assets to release | |
| run: | | |
| gh release upload ${{ github.ref_name }} \ | |
| dist/*.AppImage \ | |
| dist/latest-linux.yml \ | |
| --repo ${{ github.repository }} \ | |
| --clobber | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |