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

How Can I have name of tag for args? #28

Closed
ragnarov opened this issue Oct 16, 2021 · 6 comments
Closed

How Can I have name of tag for args? #28

ragnarov opened this issue Oct 16, 2021 · 6 comments
Assignees

Comments

@ragnarov
Copy link

ragnarov commented Oct 16, 2021

name: Publish Release
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Create a Release
      uses: elgohr/Github-Release-Action@master
      env:
        GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
      with:
        args: MyReleaseMessage

Say the name of the tag is v0.001
I want that to be args
How to do that?
It seems Environment variables can't be used

@elgohr
Copy link
Owner

elgohr commented Oct 16, 2021

The tag is set when the release is created.

@elgohr
Copy link
Owner

elgohr commented Oct 16, 2021

I guess you're looking for something like this https://github.community/t/how-to-get-just-the-tag-name/16241/4

@ragnarov
Copy link
Author

ragnarov commented Oct 16, 2021

I guess you're looking for something like this https://github.community/t/how-to-get-just-the-tag-name/16241/4

Works. Thanks. :)

The tag is set when the release is created.

Okay, but how can I change that? Or use an existing tag?
Also what is the function of entryPoint & release ?

@ragnarov
Copy link
Author

ragnarov commented Oct 17, 2021

I tried using entryPoint
entryPoint: value
That broke the action
I then tried release
release: value
That seemed to do nothing
How can I use an existing tag here? (see the image)
image

@elgohr
Copy link
Owner

elgohr commented Oct 18, 2021

You could make it dynamic by

- name: Publish
  pre: echo ::save-state name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})
  uses: elgohr/Github-Release-Action@master
  with:
    args: "${{ env.STATE_RELEASE_VERSION }}"

@ragnarov
Copy link
Author

Okay. Thanks man.

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

No branches or pull requests

2 participants