name: Build artifacts on: workflow_dispatch: inputs: git-sha: description: "Commit SHA-1 to checkout" required: false default: "" workflow_call: inputs: git-sha: type: string required: false default: "" env: GH_TOKEN: ${{ github.token }} jobs: build-windows: name: Build Windows runs-on: windows-latest steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.git-sha || inputs.git-sha || github.sha }} - name: Use Node.js 24 uses: actions/setup-node@v4 with: node-version: 24 cache: "npm" - name: Install npm dependencies run: npm ci - name: Build the production app shell: bash run: npm run build - name: Build the Electron app shell: bash run: npm run electron-win - name: Upload x64 artifact uses: actions/upload-artifact@v4 with: name: bitburner-win32-x64 include-hidden-files: true path: .build/bitburner-win32-x64/* if-no-files-found: error - name: Upload arm64 artifact uses: actions/upload-artifact@v4 with: name: bitburner-win32-arm64 include-hidden-files: true path: .build/bitburner-win32-arm64/* if-no-files-found: error build-linux: name: Build Linux runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.git-sha || inputs.git-sha || github.sha }} - name: Use Node.js 24 uses: actions/setup-node@v4 with: node-version: 24 cache: "npm" - name: Install npm dependencies run: npm ci - name: Build the production app run: npm run build - name: Build the Electron app run: npm run electron-linux - name: Upload x64 artifact uses: actions/upload-artifact@v4 with: name: bitburner-linux-x64 include-hidden-files: true path: .build/bitburner-linux-x64/* if-no-files-found: error - name: Upload arm64 artifact uses: actions/upload-artifact@v4 with: name: bitburner-linux-arm64 include-hidden-files: true path: .build/bitburner-linux-arm64/* if-no-files-found: error build-mac: name: Build macOS runs-on: macos-latest steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.git-sha || inputs.git-sha || github.sha }} - name: Use Node.js 24 uses: actions/setup-node@v4 with: node-version: 24 cache: "npm" - name: Install npm dependencies run: npm ci - name: Build the production app run: npm run build - name: Build the Electron app run: npm run electron-mac - name: Upload darwin-universal artifact uses: actions/upload-artifact@v4 with: name: bitburner-darwin-universal include-hidden-files: true path: .build/bitburner-darwin-universal/* if-no-files-found: error