diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a81eae54d..666fb5e9d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,14 +1,14 @@ name: Build and publish + on: - push: - tags: - - '*' + workflow_run: + workflows: [Tests] + types: completed + jobs: - tests: - uses: ./.github/workflows/tests.yml build: - needs: [tests] runs-on: ${{ matrix.os }} + if: github.event.workflow_run.conclusion == 'success' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v') strategy: matrix: os: @@ -17,19 +17,21 @@ jobs: - windows-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 20 cache: 'npm' - name: Install Snapcraft + # TODO: Bump after we're sure it works with samuelmeuli/action-electron-builder@v1 uses: samuelmeuli/action-snapcraft@v1 if: startsWith(matrix.os, 'ubuntu') - name: Build & publish Caprine + # TODO: Upgrade action in fork https://github.com/dusansimic/action-electron-builder uses: samuelmeuli/action-electron-builder@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3577ea68e..b28a6cd45 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,12 +10,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 20 cache: 'npm' - name: Run tests