-
Notifications
You must be signed in to change notification settings - Fork 2
31 lines (31 loc) · 1.09 KB
/
gh-release-drafter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Automatically draft release notes based on any pull requests made to master
name: Github Release Drafter
on:
push:
branches:
- main
workflow_dispatch:
jobs:
update_release_draft:
runs-on: ubuntu-latest
env:
APP_VERSION: '0.0.0'
steps:
# Extract current version number from package.json and set it as the APP_VERSION env variable
- name: checkout
uses: actions/checkout@main
- name: set_version
run: echo "APP_VERSION=$(echo "$(cat package.json | jq -r '.version')")" >> $GITHUB_ENV
- name: check_version
run: echo "version $env.APP_VERSION"
# Drafts your next Release notes as Pull Requests are merged into "main"
# https://github.com/release-drafter/release-drafter
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: v${{env.APP_VERSION}}
tag: v${{env.APP_VERSION}}
# TODO - consider alternatives:
# - https://github.com/semantic-release/semantic-release
# - https://github.com/marketplace/actions/release-please-action