DuckStation #247
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: Build & Release | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| permissions: | |
| contents: write | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| build_linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| - name: Install Linux dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y npm cmake libsdl2-dev libarchive-tools | |
| npm install | |
| - name: Build Linux packages | |
| run: | | |
| npx electron-builder --config build/builder.yml --linux --publish=never | |
| - name: Rename AppImage | |
| run: | | |
| mv -v "dist/emulsion_x86_64.AppImage" "dist/Emulsion-${{ github.ref_name }}-x86_64.AppImage" | |
| - name: Upload Linux artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-dist | |
| path: dist/* | |
| build_windows: | |
| runs-on: windows-latest | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build Windows package | |
| run: | | |
| npx electron-builder --config build/builder.yml --win nsis --x64 | |
| - name: Upload Windows artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-dist | |
| path: dist/* | |
| build_macos: | |
| runs-on: macos-latest | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build macOS package | |
| run: | | |
| npx electron-builder --config build/builder.yml --mac dmg --x64 | |
| - name: Upload macOS artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-dist | |
| path: dist/* | |
| release: | |
| needs: [build_linux, build_windows, build_macos] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download Linux artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-dist | |
| path: dist/ | |
| - name: Download Windows artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-dist | |
| path: dist/ | |
| - name: Download macOS artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: macos-dist | |
| path: dist/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| name: Emulsion ${{ github.ref_name }} | |
| draft: false | |
| prerelease: false | |
| files: | | |
| dist/*.deb | |
| dist/*.AppImage | |
| dist/*.rpm | |
| dist/*.pacman | |
| dist/*.freebsd | |
| dist/*.exe | |
| dist/*.dmg |