-
Notifications
You must be signed in to change notification settings - Fork 27
46 lines (44 loc) · 1.35 KB
/
create_release.yaml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Release Notes
on:
push:
tags:
- '*'
jobs:
notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Previous Tag
id: previousTag
run: |
PREVIOUS_TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))
echo ${PREVIOUS_TAG}
echo ::set-output name=tag::${PREVIOUS_TAG}
- name: Get New Tag
id: nextTag
run: |
NEW_TAG=${GITHUB_REF#refs/tags/}
echo ${NEW_TAG}
echo ::set-output name=tag::${NEW_TAG}
- uses: actions/setup-node@v3
- name: Generate Release Notes
id: notes
run: |
NOTES=$(npx generate-github-release-notes ilios frontend ${{ steps.previousTag.outputs.tag }} ${{steps.nextTag.outputs.tag}})
echo ${NOTES}
# remove line breaks from notes so they can be passed around
NOTES="${NOTES//$'\n'/'%0A'}"
echo "::set-output name=releaseNotes::$NOTES"
- name: Generate Release Name
id: name
run: |
NAME=$(npx dartajax-music random-song)
echo ${NAME}
echo "::set-output name=releaseName::$NAME"
- uses: ncipollo/release-action@v1
with:
name: ${{steps.name.outputs.releaseName}}
body: ${{steps.notes.outputs.releaseNotes}}
token: ${{ secrets.ZORGBORT_TOKEN }}