Skip to content

chore: Release 0.0.1rc0 (take 5) #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/scripts/publish_preflight_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ echo_info "Checking release tag"
echo_info "--------------------------------------------"
echo_info ""

echo_info "---< git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true >---"
git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
echo ""

readonly EXISTING_TAG=`git rev-parse -q --verify "refs/tags/v${RELEASE_VERSION}"` || true
if [[ -n "${EXISTING_TAG}" ]]; then
echo_warn "Tag v${RELEASE_VERSION} already exists. Exiting."
Expand All @@ -155,8 +159,8 @@ echo_info "Generating changelog"
echo_info "--------------------------------------------"
echo_info ""

echo_info "---< git fetch origin main >---"
git fetch origin main
echo_info "---< git fetch origin main --prune --unshallow >---"
git fetch origin main --prune --unshallow
echo ""

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

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


echo ""
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ jobs:
# To publish a release, merge the release PR with the label 'release:publish'.
# To stage a release without publishing it, manually invoke the workflow.
# . or apply the 'release:stage' label to a PR.
if: (github.event.pull_request.merged && contains(github.event.pull_request.labels.*.name, 'release:publish')) ||
if: >
(github.event.pull_request.merged && contains(github.event.pull_request.labels.*.name, 'release:publish')) ||
github.event.workflow_dispatch ||
contains(github.event.pull_request.labels.*.name, 'release:stage')
(!github.event.pull_request.merged && contains(github.event.pull_request.labels.*.name, 'release:stage'))

runs-on: ubuntu-latest

Expand Down