Skip to content

Commit cf00d80

Browse files
authored
fix release script (#501)
1 parent cf57075 commit cf00d80

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/swift.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
env:
8686
GITHUB_TOKEN: ${{ secrets.CI_USER_TOKEN }}
8787
BRANCH: ${{ github.ref_name }}
88+
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
8889
COCOAPODS_VERSION: '1.11.3'
8990
run: |
9091
gem install cocoapods -v $COCOAPODS_VERSION

Scripts/run_release.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ set -e
88
# COCOAPODS_TRUNK_TOKEN - should be defined in job settings so that we can `pod trunk push`
99

1010
function release_github {
11+
LAST_RELEASE=$(git describe --abbrev=0 --tags)
12+
if [[ ${LAST_RELEASE} == "v${VERSION}" ]]; then
13+
echo "${LAST_RELEASE} tag exists already (probably created while in the current release process). Skipping..."
14+
return
15+
fi
16+
1117
CHANGELOG="CHANGELOG.md"
1218

1319
# check that CHANGELOG.md has been updated
@@ -23,7 +29,6 @@ function release_github {
2329
DESCRIPTION=$(awk "/^${NEW_VERSION}$/,/^${LAST_VERSION:-nothingmatched}$/" ${CHANGELOG} | grep -v "^${LAST_VERSION:-nothingmatched}$")
2430

2531
hub release create v${VERSION} -m "Release ${VERSION}" -m "${DESCRIPTION}" -t "${BRANCH}"
26-
2732
}
2833

2934
function release_cocoapods {

0 commit comments

Comments
 (0)