Skip to content

Commit

Permalink
ci: 调整输出格式避免错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Anselyuki committed Nov 1, 2023
1 parent 5ad4f13 commit 57f9316
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
permissions:
contents: write

env:
env_version: 1.0.0

jobs:
build:
name: build
Expand Down Expand Up @@ -40,6 +43,9 @@ jobs:
archive-name: maimai-search-${{ github.ref_name }}-macos-aarch64.tar.gz
fail-fast: false

outputs:
COMMIT_MESSAGE: ${{ steps.commit_message.outputs.COMMIT_MESSAGE }}

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -51,13 +57,13 @@ jobs:
git fetch --tags
LATEST_TAG=$(git describe --tags --abbrev=0)
PREVIOUS_TAG=$(git tag | tail -n2 | head -n1)
echo "> Automatically generated by the GitHub Action" > commit.log
echo "" >> commit.log
git log $PREVIOUS_TAG...$LATEST_TAG --pretty=format:"%h - %s" -5 >> commit.log
# echo "> Automatically generated by the GitHub Action" > commit.log
# echo "" >> commit.log
git log $PREVIOUS_TAG...$LATEST_TAG --pretty=format:"%h - %s" -5 > commit.log
echo "===== Commit file ====="
cat commit.log
echo "====== files end ======"
echo "COMMIT_MESSAGE=$(cat commit.log)" >> $GITHUB_ENV
echo "COMMIT_MESSAGE=$(cat commit.log)" >> $GITHUB_OUTPUT

- name: Rust Cache
uses: Swatinem/[email protected]
Expand Down

0 comments on commit 57f9316

Please sign in to comment.