From d5c11fe9082b738fdc963e72be93ef9e17814d20 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Wed, 18 Sep 2024 00:00:05 +0800 Subject: [PATCH 1/2] Update Release.yml --- .github/workflows/Release.yml | 40 ++++++----------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 1bab78419ed..42ee39db534 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -49,36 +49,10 @@ jobs: permissions: contents: write steps: - - name: Get latest version - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - LATEST_VERSION=$(gh release view --repo ${{ github.repository }} --json tagName --jq .tagName) - echo "Latest release version: $LATEST_VERSION" - echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV - - - name: Bump patch version - run: | - # Extract version numbers - VERSION=${LATEST_VERSION#v} - MAJOR=$(echo $VERSION | cut -d. -f1) - MINOR=$(echo $VERSION | cut -d. -f2) - PATCH=$(echo $VERSION | cut -d. -f3) - - # Bump the patch number - PATCH=$((PATCH+1)) - - # Form new version - NEW_VERSION="v$MAJOR.$MINOR.$PATCH" - echo "New version: $NEW_VERSION" - echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV - - - name: Create new GitHub release - env: - GIT_REF: ${{ needs.create-git-branch-release.outputs.branch }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release create $NEW_VERSION \ - --repo ${{ github.repository }} \ - --generate-notes \ - --target "$GIT_REF" + - uses: Wei18/GitHubSwiftActions/Actions/Release@main + with: + owner: ${{ github.repository_owner }} + repo: ${{ github.event.repository.name }} + token: ${{ secrets.GITHUB_TOKEN }} + ref: ${{ needs.create-git-branch-release.outputs.branch }} + type: "patch" From e14ce4586ab1951b73a81f83cabd4eb1c4db5996 Mon Sep 17 00:00:00 2001 From: Wei <41205mw@gmail.com> Date: Wed, 18 Sep 2024 00:00:45 +0800 Subject: [PATCH 2/2] Update Release.yml --- .github/workflows/Release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 42ee39db534..1fdf097face 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -49,7 +49,7 @@ jobs: permissions: contents: write steps: - - uses: Wei18/GitHubSwiftActions/Actions/Release@main + - uses: Wei18/GitHubSwiftActions/Actions/Release@1.0.3 with: owner: ${{ github.repository_owner }} repo: ${{ github.event.repository.name }}