From d1fc53dc35f26bdc4b1e88566c93b723fcd1e1cb Mon Sep 17 00:00:00 2001 From: scarf Date: Sat, 16 Mar 2024 22:36:13 +0900 Subject: [PATCH 1/3] ci: explicitly give tag range --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 694012856d42..d599a8116fdf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,11 +15,13 @@ jobs: count: ${{ steps.env_vars.outputs.count }} tag_name: ${{ steps.env_vars.outputs.tag_name }} release_name: ${{ steps.env_vars.outputs.release_name }} + yesterday_tag_name: ${{ steps.env_vars.outputs.yesterday_tag_name }} steps: - uses: actions/checkout@v4 - id: env_vars run: | TAG_NAME=$(date -u --iso-8601 --date='1 day ago') + YESTERDAY_TAG_NAME=$(date -u --iso-8601 --date='2 day ago') COMMITS=$(git log --oneline --since="$TAG_NAME" | wc -l) RELEASE_NAME="Experimental $TAG_NAME" @@ -27,6 +29,7 @@ jobs: echo "count=$COMMITS" >> "$GITHUB_OUTPUT" echo "tag_name=$TAG_NAME" >> "$GITHUB_OUTPUT" + echo "yesterday_tag_name=$YESTERDAY_TAG_NAME" >> "$GITHUB_OUTPUT" echo "release_name=$RELEASE_NAME" >> "$GITHUB_OUTPUT" release: @@ -68,6 +71,8 @@ jobs: uses: mikepenz/release-changelog-builder-action@v4.2.0 with: configuration: "changelog.json" + fromTag: ${{ needs.metadata.outputs.yesterday_tag_name }} + toTag: ${{ needs.metadata.outputs.tag_name }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1bd4877792eedf295e2c7f28e9878e7cc495a9f7 Mon Sep 17 00:00:00 2001 From: scarf Date: Sat, 16 Mar 2024 22:42:51 +0900 Subject: [PATCH 2/3] ci: skip fetching tag --- .github/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d599a8116fdf..92460a808a6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,8 +64,6 @@ jobs: - uses: actions/checkout@v4 - - run: git fetch origin tag ${{ needs.metadata.outputs.tag_name }} --no-tags - - name: Build Changelog id: build_changelog uses: mikepenz/release-changelog-builder-action@v4.2.0 From 5f8c7f661277ee15bbca0a5366a1cc425330b1ae Mon Sep 17 00:00:00 2001 From: scarf Date: Sat, 16 Mar 2024 23:00:51 +0900 Subject: [PATCH 3/3] ci: don't checkout twice --- .github/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 92460a808a6e..f1bb04d1cfc8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,8 +62,6 @@ jobs: custom_tag: ${{ needs.metadata.outputs.tag_name }} tag_prefix: "" - - uses: actions/checkout@v4 - - name: Build Changelog id: build_changelog uses: mikepenz/release-changelog-builder-action@v4.2.0