Skip to content

Commit 63c9f54

Browse files
authored
chore: Release 0.0.1rc0 (take 5) (#71)
1 parent cd5af3e commit 63c9f54

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

.github/scripts/publish_preflight_check.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ echo_info "Checking release tag"
134134
echo_info "--------------------------------------------"
135135
echo_info ""
136136

137+
echo_info "---< git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true >---"
138+
git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
139+
echo ""
140+
137141
readonly EXISTING_TAG=`git rev-parse -q --verify "refs/tags/v${RELEASE_VERSION}"` || true
138142
if [[ -n "${EXISTING_TAG}" ]]; then
139143
echo_warn "Tag v${RELEASE_VERSION} already exists. Exiting."
@@ -155,8 +159,8 @@ echo_info "Generating changelog"
155159
echo_info "--------------------------------------------"
156160
echo_info ""
157161

158-
echo_info "---< git fetch origin main >---"
159-
git fetch origin main
162+
echo_info "---< git fetch origin main --prune --unshallow >---"
163+
git fetch origin main --prune --unshallow
160164
echo ""
161165

162166
echo_info "Generating changelog from history..."
@@ -166,11 +170,11 @@ echo "$CHANGELOG"
166170

167171
# Parse and preformat the text to handle multi-line output.
168172
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-a-multiline-string
169-
FILTERED_CHANGELOG=`echo "$CHANGELOG" | grep -v "\\[INFO\\]"`
173+
FILTERED_CHANGELOG=`echo "$CHANGELOG" | grep -v "[INFO]"`
170174
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
171-
echo "changelog=<<$EOF" >> "$GITHUB_OUTPUT"
172-
echo $CHANGELOG >> "$GITHUB_OUTPUT"
173-
echo $EOF >> "$GITHUG_OUTPUT"
175+
echo "changelog<<$EOF" >> "$GITHUB_OUTPUT"
176+
echo "$CHANGELOG" >> "$GITHUB_OUTPUT"
177+
echo "$EOF" >> "$GITHUB_OUTPUT"
174178

175179

176180
echo ""

.github/workflows/release.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ jobs:
2525
# To publish a release, merge the release PR with the label 'release:publish'.
2626
# To stage a release without publishing it, manually invoke the workflow.
2727
# . or apply the 'release:stage' label to a PR.
28-
if: (github.event.pull_request.merged && contains(github.event.pull_request.labels.*.name, 'release:publish')) ||
28+
if: >
29+
(github.event.pull_request.merged && contains(github.event.pull_request.labels.*.name, 'release:publish')) ||
2930
github.event.workflow_dispatch ||
30-
contains(github.event.pull_request.labels.*.name, 'release:stage')
31+
(!github.event.pull_request.merged && contains(github.event.pull_request.labels.*.name, 'release:stage'))
3132
3233
runs-on: ubuntu-latest
3334

0 commit comments

Comments
 (0)