CI Release #316
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: "CI Release" | |
| on: | |
| workflow_run: | |
| workflows: | |
| - "CI build" | |
| types: | |
| - "completed" | |
| jobs: | |
| # Generate and upload executables to Github releases | |
| generate-upload-tarballs-linux-x64: | |
| name: Generate and upload tarballs for Linux x64 | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - run: sudo apt update && sudo apt install -y gcc g++ make git build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev libfontconfig1 fontconfig libfontconfig1-dev libfontconfig nsis p7zip | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Get latest release tag | |
| id: previoustag | |
| uses: WyriHaximus/github-action-get-previous-tag@v1 | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| env: | |
| HUSKY: "0" | |
| - name: Build from source | |
| run: npm run build | |
| - name: Generate oclif manifest | |
| run: npx oclif manifest | |
| - name: Download web uis | |
| run: npm run ci:download-web-uis | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run daemon and make sure it's online | |
| run: npm run ci:daemon:test-before-release | |
| - name: Generate tarballs | |
| run: npm run generate:executable:tarballs:linux:x64 | |
| - name: Rename tarballs and installers | |
| run: npm run ci:rename-tarballs | |
| - name: Upload tarballs to release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| file: "*.tar.gz" | |
| file_glob: true | |
| tag: ${{ steps.previoustag.outputs.tag }} | |
| overwrite: true | |
| generate-upload-tarballs-macos-x64-arm64: | |
| name: Generate and upload tarballs for Macos (x64 + arm64) | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: macos-latest # will use arm64 | |
| permissions: | |
| contents: write | |
| strategy: | |
| matrix: | |
| arch: [x64, arm64] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Get latest release tag | |
| id: previoustag | |
| uses: WyriHaximus/github-action-get-previous-tag@v1 | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| env: | |
| HUSKY: "0" | |
| - name: Build from source | |
| run: npm run build | |
| - name: Generate oclif manifest | |
| run: npx oclif manifest | |
| - name: Download web uis | |
| run: npm run ci:download-web-uis | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run daemon and make sure it's online | |
| run: npm run ci:daemon:test-before-release | |
| - name: Generate tarballs | |
| run: npm run generate:executable:tarballs:macos:${{ matrix.arch }} | |
| - name: Rename tarballs and installers | |
| run: npm run ci:rename-tarballs | |
| - name: Upload tarballs to release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| file: "*.tar.gz" | |
| file_glob: true | |
| tag: ${{ steps.previoustag.outputs.tag }} | |
| overwrite: true | |
| generate-upload-windows-installers: | |
| name: Generate and upload windows installers | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Get latest release tag | |
| id: previoustag | |
| uses: WyriHaximus/github-action-get-previous-tag@v1 | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| env: | |
| HUSKY: "0" | |
| - name: Build from source | |
| run: npm run build | |
| - name: Generate oclif manifest | |
| run: npx oclif manifest | |
| - name: Download web uis | |
| run: npm run ci:download-web-uis | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run daemon and make sure it's online | |
| run: npm run ci:daemon:test-before-release | |
| - name: Install NSIS | |
| run: choco install nsis -y | |
| shell: powershell | |
| - name: Add NSIS to PATH | |
| run: Add-Content $env:GITHUB_PATH 'C:\Program Files (x86)\NSIS' | |
| shell: powershell | |
| - name: Generate Windows installer | |
| run: npm run generate:installer:windows | |
| # You can't use oclif pack on windows, so we're skipping it for now | |
| # - name: Generate Windows tarballs | |
| # run: npm run generate:executable:tarballs:windows | |
| - name: Rename tarballs and installers | |
| run: npm run ci:rename-tarballs | |
| - name: Upload windows installers to release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| file: "*.exe" | |
| file_glob: true | |
| tag: ${{ steps.previoustag.outputs.tag }} | |
| overwrite: true | |
| generate-upload-tarballs-linux-arm64: | |
| name: Generate and upload linux arm64 tarballs | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: "Get latest release tag" | |
| id: previoustag | |
| uses: "WyriHaximus/github-action-get-previous-tag@v1" | |
| - uses: pguyot/arm-runner-action@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| base_image: raspios_lite_arm64:latest | |
| cpu_info: cpuinfo/raspberrypi_zero2_w_arm64 | |
| image_additional_mb: 4096 | |
| import_github_env: true | |
| bind_mount_repository: true | |
| commands: | | |
| sudo apt-get update | |
| sudo apt-get install -y ca-certificates curl gnupg gcc g++ make git build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev libfontconfig1 fontconfig libfontconfig1-dev libfontconfig | |
| curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - | |
| sudo apt install -y nodejs | |
| HUSKY=0 npm ci | |
| npm run build | |
| npx oclif manifest | |
| npm run ci:download-web-uis | |
| npm run ci:daemon:test-before-release | |
| npm run generate:executable:tarballs:linux:arm64 | |
| npm run ci:rename-tarballs | |
| - name: Upload tarballs to release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| file: "*.tar.gz" | |
| file_glob: true | |
| tag: ${{ steps.previoustag.outputs.tag }} | |
| overwrite: true |