@@ -49,36 +49,10 @@ jobs:
49
49
permissions :
50
50
contents : write
51
51
steps :
52
- - name : Get latest version
53
- env :
54
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
55
- run : |
56
- LATEST_VERSION=$(gh release view --repo ${{ github.repository }} --json tagName --jq .tagName)
57
- echo "Latest release version: $LATEST_VERSION"
58
- echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV
59
-
60
- - name : Bump patch version
61
- run : |
62
- # Extract version numbers
63
- VERSION=${LATEST_VERSION#v}
64
- MAJOR=$(echo $VERSION | cut -d. -f1)
65
- MINOR=$(echo $VERSION | cut -d. -f2)
66
- PATCH=$(echo $VERSION | cut -d. -f3)
67
-
68
- # Bump the patch number
69
- PATCH=$((PATCH+1))
70
-
71
- # Form new version
72
- NEW_VERSION="v$MAJOR.$MINOR.$PATCH"
73
- echo "New version: $NEW_VERSION"
74
- echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
75
-
76
- - name : Create new GitHub release
77
- env :
78
- GIT_REF : ${{ needs.create-git-branch-release.outputs.branch }}
79
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
80
- run : |
81
- gh release create $NEW_VERSION \
82
- --repo ${{ github.repository }} \
83
- --generate-notes \
84
- --target "$GIT_REF"
52
+ -
uses :
Wei18/GitHubSwiftActions/Actions/[email protected]
53
+ with :
54
+ owner : ${{ github.repository_owner }}
55
+ repo : ${{ github.event.repository.name }}
56
+ token : ${{ secrets.GITHUB_TOKEN }}
57
+ ref : ${{ needs.create-git-branch-release.outputs.branch }}
58
+ type : " patch"
0 commit comments