Skip to content

Commit df94f8b

Browse files
authored
Update release and ci workflows to use GITHUB_OUTPUT and bump actions/checkout to v4. (#752)
* Update release workflow to use GITHUB_OUTPUT. * Use actions/checkout@v4 for nightly builds
1 parent b2173da commit df94f8b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.github/scripts/publish_preflight_check.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ if [[ ! "${RELEASE_VERSION}" =~ ^([0-9]*)\.([0-9]*)\.([0-9]*)$ ]]; then
7171
fi
7272

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

7676

7777
echo_info ""
@@ -169,12 +169,12 @@ readonly CHANGELOG=`${CURRENT_DIR}/generate_changelog.sh`
169169
echo "$CHANGELOG"
170170

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

179179

180180
echo ""

.github/workflows/nightly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- name: Checkout source for staging
32-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3333
with:
3434
ref: ${{ github.event.client_payload.ref || github.ref }}
3535

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
# via the 'ref' client parameter.
4141
steps:
4242
- name: Checkout source for staging
43-
uses: actions/checkout@v2
43+
uses: actions/checkout@v4
4444
with:
4545
ref: ${{ github.event.client_payload.ref || github.ref }}
4646

@@ -95,7 +95,7 @@ jobs:
9595

9696
steps:
9797
- name: Checkout source for publish
98-
uses: actions/checkout@v2
98+
uses: actions/checkout@v4
9999

100100
# Download the artifacts created by the stage_release job.
101101
- name: Download release candidates

0 commit comments

Comments
 (0)