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

Draft Release CI: Replace Deprecated ::set-output with GITHUB_OUTPUT. #1100

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

ptheywood
Copy link
Member

@ptheywood ptheywood commented Jul 28, 2023

Replace Deprecated ::set-output with >> $GITHUB_OUTPUT in the draft release workflow.


We wont' know if this fix is correct until we next create a draft release however, as the portion of the workflow it touches is only triggered on a tag push.

However I have mocked this up elsewhere:

    # Set variable using deprecated method
    - name: Process Tag (Deprecated)
      id: tag_deprecated
      run: |
        tag="test-tag-deprecated"
        echo "::set-output name=tag::${tag}"


    # print the variable from the deprecated method
    - name: Create Draft Release (Deprecated)
      id: create_release_deprecated
      run: |
        echo "Tag: ${{ steps.tag_deprecated.outputs.tag }}"


    # set the output variable using the new method
    - name: Process Tag
      id: tag
      run: |
        tag="test-tag-modern"
        echo "tag=${tag}" >> "$GITHUB_OUTPUT"

    # print the output variable after using the new method
    - name: Create Draft Release
      id: create_release
      run: |
        echo "Tag: ${{ steps.tag.outputs.tag }}"

source

image
action (valid for 90 days?)

Closes #1017

@ptheywood ptheywood requested review from Robadob and mondus July 28, 2023 13:47
@Robadob
Copy link
Member

Robadob commented Jul 28, 2023

You could trigger a draft release on this branch?

@ptheywood
Copy link
Member Author

You could trigger a draft release on this branch?

Edits to the draft release workflow do trigger it, but the part this file editied is only triggered when it was caused by a tag push (otherwise the tag value would be empty).

I've edited the top post with a linked example showing the tag variable being set the old way and the new way, with the same relative change as performed here, so I am pretty confident this is correct.

@ptheywood ptheywood marked this pull request as ready for review July 28, 2023 14:03
@ptheywood ptheywood merged commit 16813e2 into master Jul 31, 2023
47 checks passed
@ptheywood ptheywood deleted the draft-release-ci-deprecation-fix branch July 31, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Draft-Release CI set-output deprecation warnings
2 participants