name: Release UI on: push: # Sequence of patterns matched against refs/tags tags: - "ui-v*" # Push events to matching v*, i.e. v1.0, v20.15.10 jobs: build_on_windows: env: PUPPETEER_SKIP_DOWNLOAD: 'true' runs-on: windows-2022 permissions: write-all # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout source uses: actions/checkout@v2 - name: Install pnpm run: | npm i pnpm@^8.6.9 -g - name: Patch pnpm uses: actions/github-script@v3 with: script: | // https://github.com/pnpm/pnpm/issues/5638 const path = require('path') const fs = require('fs') const childProcess = require('child_process') const npmGlobalModuleFolder = childProcess.execSync('npm root -g').toString().trim() const pnpmCjsFilePath = path.join(npmGlobalModuleFolder, 'pnpm/bin/pnpm.cjs') let pnpmCjsFileContent = fs.readFileSync(pnpmCjsFilePath).toString().replace(/^(#!\/usr\/bin\/env node)/, '#!node') fs.writeFileSync(pnpmCjsFilePath, pnpmCjsFileContent) - name: Install dependencies run: | cd packages/ui pnpm i --force - name: Build run: | cd packages/ui node ./scripts/github-ci-build.mjs - name: Upload artifact uses: actions/upload-artifact@v4 with: name: binary-geekgeekrun-ui-windows-${{ github.sha }} path: | ${{ github.workspace }}/packages/ui/dist/*.exe overwrite: true build_on_macos: env: PUPPETEER_SKIP_DOWNLOAD: 'true' runs-on: macos-14 permissions: write-all # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout source uses: actions/checkout@v2 - name: Install dependencies run: | npm i pnpm@^8.6.9 -g cd packages/ui pnpm i --force - name: Build run: | cd packages/ui node ./scripts/github-ci-build.mjs - name: Upload artifact uses: actions/upload-artifact@v4 with: name: binary-geekgeekrun-ui-macos-${{ github.sha }} path: | ${{ github.workspace }}/packages/ui/dist/*.dmg overwrite: true build_on_linux: env: PUPPETEER_SKIP_DOWNLOAD: 'true' runs-on: ubuntu-22.04 permissions: write-all # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout source uses: actions/checkout@v2 - name: Install dependencies run: | npm i pnpm@^8.6.9 -g cd packages/ui pnpm i --force - name: Build run: | cd packages/ui node ./scripts/github-ci-build.mjs - name: Upload artifact uses: actions/upload-artifact@v4 with: name: binary-geekgeekrun-ui-linux-${{ github.sha }} path: | ${{ github.workspace }}/packages/ui/dist/*.deb ${{ github.workspace }}/packages/ui/dist/*.rpm overwrite: true release: runs-on: ubuntu-latest permissions: write-all needs: - build_on_linux - build_on_macos - build_on_windows steps: - name: Download artifact uses: actions/download-artifact@v4 with: path: geekgeekrun-ui@${{ github.sha }} pattern: binary-geekgeekrun-ui-* merge-multiple: true - name: Display structure of downloaded files run: ls -llR geekgeekrun-ui@${{ github.sha }} - name: Create release uses: ncipollo/release-action@v1 with: allowUpdates: true artifacts: geekgeekrun-ui@${{ github.sha }}/* tag: ${{ github.ref }} token: ${{ secrets.GITHUB_TOKEN }} body: TODO New Release.