Skip to content

Commit 0cf6aed

Browse files
authored
ci: Use GITHUB_OUTPUT envvar instead of set-output command
`save-state` and `set-output` commands used in GitHub Actions are deprecated and [GitHub recommends using environment files](https://github.blog/changelog/2023-07-24-github-actions-update-on-save-state-and-set-output-commands/). This PR updates the usage of `set-output` to `$GITHUB_OUTPUT` Instructions for envvar usage from GitHub docs: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
1 parent ce12858 commit 0cf6aed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/maven-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
gpg-passphrase: MAVEN_GPG_PASSPHRASE
3434
- name: Extract project version
3535
id: project
36-
run: echo ::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
36+
run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
3737
- name: Build with Maven
3838
run: mvn -B package --file pom.xml
3939
- name: Publish to Maven central

.github/workflows/maven-snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: mvn -B package --file pom.xml
2929
- name: Extract project version
3030
id: project
31-
run: echo ::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
31+
run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
3232
- name: Publish to snapshot repo
3333
if: ${{ endsWith(steps.project.outputs.version, '-SNAPSHOT') }}
3434
run: mvn -B deploy --file pom.xml -Pgpg-sign

0 commit comments

Comments
 (0)