Skip to content

Commit

Permalink
CI: commit sha
Browse files Browse the repository at this point in the history
  • Loading branch information
sqzw-x committed Mar 20, 2024
1 parent ecaf015 commit b39b85f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
count: ${{ steps.get-new-commits.outputs.count }}
short_sha: ${{ steps.get-new-commits.outputs.short_sha }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -32,7 +33,7 @@ jobs:
id: get-new-commits
run: |
echo "count=$(git log --oneline --since '24 hours ago' | wc -l)" >> $GITHUB_OUTPUT
echo "SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_ENV
echo "short_sha=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_OUTPUT
# https://github.com/actions/runner/issues/1985#issuecomment-1573518052
- name: Set matrix
Expand Down Expand Up @@ -155,7 +156,7 @@ jobs:
if: ${{ matrix.build == 'macos' }}
with:
overwrite: true
asset_name: MDCx-$tag-${{ matrix.build }}-${{ matrix.arch }}${{ matrix.tail }}-${{ env.SHORT_SHA }}.dmg
asset_name: MDCx-$tag-${{ matrix.build }}-${{ matrix.arch }}${{ matrix.tail }}-${{ needs.init-matrix.outputs.short_sha }}.dmg
file: dist/MDCx.dmg
prerelease: ${{ env.IS_DAILY }}
body: |
Expand All @@ -167,7 +168,7 @@ jobs:
if: ${{ matrix.build == 'windows' }}
with:
overwrite: true
asset_name: MDCx-$tag-${{ matrix.build }}-${{ matrix.arch }}${{ matrix.tail }}-${{ env.SHORT_SHA }}.exe
asset_name: MDCx-$tag-${{ matrix.build }}-${{ matrix.arch }}${{ matrix.tail }}-${{ needs.init-matrix.outputs.short_sha }}.exe
file: dist/MDCx.exe
prerelease: ${{ env.IS_DAILY }}
tag: ${{ env.IS_DAILY=='true' && 'daily_release' || github.ref }}

0 comments on commit b39b85f

Please sign in to comment.