release: Add a script to create releases on GitHub
This commit is contained in:
@@ -13,13 +13,20 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Create release on GitHub
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|
||||
|
||||
- name: use node.js 12.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
body: 'Changelog https://github.com/backstage/backstage/blob/master/CHANGELOG.md'
|
||||
draft: false
|
||||
prerelease: false
|
||||
node-version: '12.x'
|
||||
|
||||
- name: Install node dependencies
|
||||
run: yarn install @octokit/rest
|
||||
|
||||
# GITHUB_REF is of the format refs/tags/vA.B.C
|
||||
# This step extracts vA.B.C from GITHUB_REF
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: echo "::set-output name=TAG_NAME::${GITHUB_REF#refs/tags/}"
|
||||
|
||||
- name: Create release on GitHub
|
||||
run: node scripts/create-github-release.js ${{ steps.get_version.outputs.TAG_NAME }} ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} 1
|
||||
|
||||
Reference in New Issue
Block a user