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

Update draft release Action to create release targeted to main #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
7 changes: 1 addition & 6 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,21 @@ jobs:
git commit -m "Bump version to $NEW_VERSION"
git push -u origin $BRANCH_NAME
gh pr create -B main -H $BRANCH_NAME --title "Upgrade NWJDS package version to $NEW_VERSION" --body "Created by Github Action"
RELEASE_SHA=$(git rev-parse HEAD)
echo ::set-output name=new_version::$NEW_VERSION
echo ::set-output name=release_sha::$RELEASE_SHA
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
new_version: ${{ steps.bump_version.outputs.new_version }}
release_sha: ${{ steps.bump_version.outputs.release_sha }}

draft-release:
needs: update-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.update-version.outputs.release_sha }}
- run: |
gh release create ${{ needs.update-version.outputs.new_version }} \
--draft \
--generate-notes \
--target ${{ needs.update-version.outputs.release_sha }}
--target main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}