From 692bee88b87839556f31dd7e3365a24050e256d4 Mon Sep 17 00:00:00 2001 From: LynithDev <61880709+LynithDev@users.noreply.github.com> Date: Fri, 18 Oct 2024 21:16:08 +0200 Subject: [PATCH] release workflow --- .github/workflows/format.yml | 4 +-- .github/workflows/release.yml | 52 +++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 42ec5bbf..1a8e98d6 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,4 +1,4 @@ -name: Check Formatting +name: Build and Lint on: push: @@ -48,4 +48,4 @@ jobs: uses: ./.github/actions/setup-packages - name: Run Clippy - run: cargo clippy --all-targets --all-features + run: cargo clippy --all-targets --all-features -- -D warnings diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..df6878b5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,52 @@ +name: Release Build + +on: + workflow_dispatch: + +jobs: + publish-tauri: + permissions: + contents: write + strategy: + fail-fast: false + matrix: + include: + - platform: macos-latest # ARM + args: --target aarch64-apple-darwin + - platform: macos-latest # Intel + args: --target x86_64-apple-darwin + - platform: ubuntu-22.04 + args: '' + - platform: windows-latest + args: '' + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v4 + + - name: Setup pnpm + uses: ./.github/actions/setup-pnpm + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Rust + uses: ./.github/actions/setup-rust + with: + # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. + target: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} + save-cache: true + restore-cache: true + + - name: Setup Packages + uses: ./.github/actions/setup-packages + + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + projectPath: ./apps/desktop + tagName: onelauncher-__VERSION__ + releaseName: OneLauncher __VERSION__ + releaseDraft: true + prerelease: false + args: ${{ matrix.args }}