Skip to content

Commit

Permalink
Update release and ci workflows to use GITHUB_OUTPUT and bump `acti…
Browse files Browse the repository at this point in the history
…ons/checkout` to v4. (#752)

* Update release workflow to use GITHUB_OUTPUT.

* Use actions/checkout@v4 for nightly builds
  • Loading branch information
jonathanedey authored Jan 3, 2024
1 parent b2173da commit df94f8b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .github/scripts/publish_preflight_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ if [[ ! "${RELEASE_VERSION}" =~ ^([0-9]*)\.([0-9]*)\.([0-9]*)$ ]]; then
fi

echo_info "Extracted release version: ${RELEASE_VERSION}"
echo "::set-output name=version::v${RELEASE_VERSION}"
echo "version=v${RELEASE_VERSION}" >> $GITHUB_OUTPUT


echo_info ""
Expand Down Expand Up @@ -169,12 +169,12 @@ readonly CHANGELOG=`${CURRENT_DIR}/generate_changelog.sh`
echo "$CHANGELOG"

# Parse and preformat the text to handle multi-line output.
# See https://github.community/t5/GitHub-Actions/set-output-Truncates-Multiline-Strings/td-p/37870
# See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-a-multiline-string
# and https://github.com/github/docs/issues/21529#issue-1418590935
FILTERED_CHANGELOG=`echo "$CHANGELOG" | grep -v "\\[INFO\\]"`
FILTERED_CHANGELOG="${FILTERED_CHANGELOG//'%'/'%25'}"
FILTERED_CHANGELOG="${FILTERED_CHANGELOG//$'\n'/'%0A'}"
FILTERED_CHANGELOG="${FILTERED_CHANGELOG//$'\r'/'%0D'}"
echo "::set-output name=changelog::${FILTERED_CHANGELOG}"
echo "changelog<<CHANGELOGEOF" >> $GITHUB_OUTPUT
echo "$FILTERED_CHANGELOG" >> $GITHUB_OUTPUT
echo "CHANGELOGEOF" >> $GITHUB_OUTPUT


echo ""
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

steps:
- name: Checkout source for staging
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.ref || github.ref }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
# via the 'ref' client parameter.
steps:
- name: Checkout source for staging
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.ref || github.ref }}

Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:

steps:
- name: Checkout source for publish
uses: actions/checkout@v2
uses: actions/checkout@v4

# Download the artifacts created by the stage_release job.
- name: Download release candidates
Expand Down

0 comments on commit df94f8b

Please sign in to comment.