Skip to content

Commit

Permalink
fix: output commit sha
Browse files Browse the repository at this point in the history
  • Loading branch information
vincehi committed Jun 30, 2023
1 parent b7c892b commit de0ab89
Showing 1 changed file with 51 additions and 46 deletions.
97 changes: 51 additions & 46 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit de0ab89

Please sign in to comment.