-
Notifications
You must be signed in to change notification settings - Fork 317
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
question: how to use github context in config file? #1345
Comments
@h3n4l - One option you can try is to use environment variables to set the # .github/workflows/release-drafter.yml
name: 'Release Drafter'
run-name: 'Release Drafter'
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
types: [ opened, reopened, synchronize ]
permissions:
contents: read
jobs:
update_release_draft:
runs-on: [ ubuntu-latest ]
name: Update Release Draft
permissions:
contents: write
pull-requests: write
steps:
- name: Set Environment Variables
run: |
echo "RELEASE_NAME=[Draft] Next Release" >> $GITHUB_ENV
echo "RELEASE_TAG=v$(date +'%Y.%m.%d')" >> $GITHUB_ENV
echo "RELEASE_VERSION=v$(date +'%Y.%m.%d')" >> $GITHUB_ENV
- name: Draft Release
uses: release-drafter/[email protected]
with:
commitish: main
name: ${{ env.RELEASE_NAME }}
tag: ${{ env.RELEASE_TAG }}
version: ${{ env.RELEASE_VERSION }}
publish: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, release-drafter team, I'm using release-drafter to create a release drafter when the tag push event fires.
But when I try to use the github context in the config file, it doesn't seem to work.
Here is the action file I use:
Config file:
And IMO, the release name should be like
0.0.1 🌈
, but I get the following:Did I miss something?
The text was updated successfully, but these errors were encountered: