FLAMEGPU / FLAMEGPU2

FLAME GPU 2 is a GPU accelerated agent based modelling framework for CUDA C++ and Python
https://flamegpu.com
MIT License
105 stars 20 forks source link

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

Closed ptheywood closed 1 year ago

ptheywood commented 1 year ago

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

Robadob commented 1 year ago

You could trigger a draft release on this branch?

ptheywood commented 1 year ago

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.