From 272ddfe5ae6ae54787eeb19f1f69dd2d0ae21ed7 Mon Sep 17 00:00:00 2001 From: Slyker Date: Tue, 16 Apr 2024 18:46:48 -0400 Subject: [PATCH] Fix gh actions v2 (#82) * * Main do build the project on every pushes without creating a new release * Release do build and create a new release on every closed PRs branch in main * Nightly do build and create a new nightly release on every closed PRs in branch in dev * Rename main * adding permissions to override releases assets --- .github/workflows/pr-nightly-build.yml | 4 +- .github/workflows/pr-release-build.yml | 4 +- .../{main.yml => push-testing-build.yml} | 75 +++++++++---------- 3 files changed, 40 insertions(+), 43 deletions(-) rename .github/workflows/{main.yml => push-testing-build.yml} (67%) diff --git a/.github/workflows/pr-nightly-build.yml b/.github/workflows/pr-nightly-build.yml index 75e4b0d4..a33f285f 100644 --- a/.github/workflows/pr-nightly-build.yml +++ b/.github/workflows/pr-nightly-build.yml @@ -11,6 +11,8 @@ env: CI: false jobs: publish-tauri: + permissions: + contents: write strategy: fail-fast: false matrix: @@ -22,7 +24,7 @@ jobs: - name: setup node uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 20 - name: install Rust stable uses: dtolnay/rust-toolchain@stable - name: install dependencies (ubuntu only) diff --git a/.github/workflows/pr-release-build.yml b/.github/workflows/pr-release-build.yml index 4609ce64..ecc0a99d 100644 --- a/.github/workflows/pr-release-build.yml +++ b/.github/workflows/pr-release-build.yml @@ -11,6 +11,8 @@ env: CI: false jobs: publish-tauri: + permissions: + contents: write strategy: fail-fast: false matrix: @@ -22,7 +24,7 @@ jobs: - name: setup node uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 20 - name: install Rust stable uses: dtolnay/rust-toolchain@stable - name: install dependencies (ubuntu only) diff --git a/.github/workflows/main.yml b/.github/workflows/push-testing-build.yml similarity index 67% rename from .github/workflows/main.yml rename to .github/workflows/push-testing-build.yml index e6b0dae1..c0e5da9d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/push-testing-build.yml @@ -1,41 +1,34 @@ -name: 'Build release' -on: - pull_request: - push: - branches: - - main -env: - CI: false - -jobs: - publish-tauri: - strategy: - fail-fast: false - matrix: - platform: [macos-latest, ubuntu-20.04, windows-latest] - - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v3 - - name: setup node - uses: actions/setup-node@v3 - with: - node-version: 16 - - name: install Rust stable - uses: dtolnay/rust-toolchain@stable - - name: install dependencies (ubuntu only) - if: matrix.platform == 'ubuntu-20.04' - run: | - sudo apt-get update - sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf - - name: install app dependencies and build it - run: yarn && yarn build - - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tagName: Neuz-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version - releaseName: 'Neuz v__VERSION__' - releaseBody: 'See the assets to download this version and install.' - releaseDraft: true - prerelease: false +name: 'Push testing build' +on: + push: + branches: + - "**" +env: + CI: false + +jobs: + publish-tauri: + strategy: + fail-fast: false + matrix: + platform: [macos-latest, ubuntu-20.04, windows-latest] + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v3 + - name: setup node + uses: actions/setup-node@v3 + with: + node-version: 20 + - name: install Rust stable + uses: dtolnay/rust-toolchain@stable + - name: install dependencies (ubuntu only) + if: matrix.platform == 'ubuntu-20.04' + run: | + sudo apt-get update + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf + - name: install app dependencies and build it + run: yarn && yarn build + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}