Skip to content
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

github: replace deprecated command with environment file #6417

Merged
merged 1 commit into from
Jul 13, 2023
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: |
PACKAGE_NAME=protoc-gen-go-grpc.${GITHUB_REF#refs/tags/cmd/protoc-gen-go-grpc/}.${{ matrix.goos }}.${{ matrix.goarch }}.tar.gz
tar -czvf $PACKAGE_NAME -C build .
echo ::set-output name=name::${PACKAGE_NAME}
echo "name=${PACKAGE_NAME}" >> $GITHUB_OUTPUT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the blog post you linked to: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/, I see the following example

- name: Set output
run: echo "{name}={value}" >> $GITHUB_OUTPUT

So, should this be:

echo "{name}={PACKAGE_NAME}" >> $GITHUB_OUTPUT

Also, can you verify that your change works?

Copy link
Contributor Author

@jongwooo jongwooo Jul 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, can you verify that your change works?

@easwars Thanks for the review! This issue was also present in grpc-kotlin and has been merged.
I found an example code in GitHub Docs, you can set the name and value as below:

- name: Set color
  id: random-color-generator
  run: echo "SELECTED_COLOR=green" >> "$GITHUB_OUTPUT"
- name: Get color
  run: echo "The selected color is ${{ steps.random-color-generator.outputs.SELECTED_COLOR }}"


- name: Upload asset
uses: actions/upload-release-asset@v1
Expand Down