chore(pre-release): replace action to actions/create-release@v1 #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Release Candidate | |
on: | |
push: | |
branches: ["RC-*"] | |
tags: ["v*"] | |
jobs: | |
create-release-candidate: | |
runs-on: ubuntu-latest | |
name: Create Release Candidate | |
if: github.ref_type == 'tag' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Generate release notes | |
id: generate_release_notes | |
run: | | |
COMMITS=$(git log ${{ github.ref_name }}..HEAD --pretty=format:"- %s") | |
echo "NOTES=\"This is the release candidate for version ${{ github.ref_name }}.\\n\\n$COMMITS\"" >> $GITHUB_ENV | |
- name: Create Release Candidate | |
id: create_release_candidate | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref_name }} | |
release_name: Release Candidate ${{ github.ref_name }} | |
body: $NOTES | |
draft: true | |
prerelease: true |