From de0ab89c6abc5565b72f2dffdbb6b04704b27514 Mon Sep 17 00:00:00 2001 From: souricevincent Date: Fri, 30 Jun 2023 10:06:59 +0200 Subject: [PATCH] fix: output commit sha --- .github/workflows/main.yml | 97 ++++++++++++++++++++------------------ 1 file changed, 51 insertions(+), 46 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6acd658..e75e109 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,49 +57,54 @@ jobs: - name: Echo run: | echo "${{ steps.push-commit.outputs.last-commit-sha }}" -# build: -# needs: -# - get-next-release -# - bump-and-push -# if: needs.get-next-release.outputs.next-release-published == 'true' -# permissions: -# contents: write -# strategy: -# fail-fast: false -# matrix: -# platform: [ macos-latest ] -# runs-on: ${{ matrix.platform }} -# steps: -# - name: Checkout repository -# uses: actions/checkout@v3 -# -# - name: Rust setup -# uses: dtolnay/rust-toolchain@stable -# -# - name: Rust cache -# uses: swatinem/rust-cache@v2 -# with: -# workspaces: './src-tauri -> target' -# -# - name: Sync node version and setup cache -# uses: actions/setup-node@v3 -# with: -# cache: 'npm' # Set this to npm, yarn or pnpm. -# -# - name: Install frontend dependencies -# # If you don't have `beforeBuildCommand` configured you may want to build your frontend here too. -# run: npm install # Change this to npm, yarn or pnpm. -# -# - name: Build the app -# id: tauri-action -# uses: tauri-apps/tauri-action@v0 -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} -# TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} -# with: -# tagName: ${{ needs.get-next-release.outputs.next-release-git-tag }} -# releaseName: ${{ needs.get-next-release.outputs.next-release-version }} -# releaseBody: ${{ needs.get-next-release.outputs.next-release-notes }} -# releaseDraft: false -# prerelease: false + outputs: + last-commit-sha: ${{ steps.push-commit.outputs.last-commit-sha }} + + build: + needs: + - get-next-release + - bump-and-push + if: needs.get-next-release.outputs.next-release-published == 'true' + permissions: + contents: write + strategy: + fail-fast: false + matrix: + platform: [ macos-latest ] + runs-on: ${{ matrix.platform }} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + ref: ${{ needs.bump-and-push.outputs.last-commit-sha }} + + - name: Rust setup + uses: dtolnay/rust-toolchain@stable + + - name: Rust cache + uses: swatinem/rust-cache@v2 + with: + workspaces: './src-tauri -> target' + + - name: Sync node version and setup cache + uses: actions/setup-node@v3 + with: + cache: 'npm' # Set this to npm, yarn or pnpm. + + - name: Install frontend dependencies + # If you don't have `beforeBuildCommand` configured you may want to build your frontend here too. + run: npm install # Change this to npm, yarn or pnpm. + + - name: Build the app + id: tauri-action + uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} + TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} + with: + tagName: ${{ needs.get-next-release.outputs.next-release-git-tag }} + releaseName: ${{ needs.get-next-release.outputs.next-release-version }} + releaseBody: ${{ needs.get-next-release.outputs.next-release-notes }} + releaseDraft: false + prerelease: false