-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (37 loc) · 1.06 KB
/
release.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
32
33
34
35
36
37
38
name: release
on:
push:
tags: ['v*.*.*']
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: master
- run: git fetch --tags
- name: check branch
run: |
br="$(git branch --contains $GITHUB_REF --format '%(refname:short)' master)"
if [[ "$br" != "master" ]]; then
echo "$br != master"
exit 1
fi
- name: Test
uses: ./.github/actions/test
- name: release-notes
run: 'echo "$(git tag -l --format="%(contents:body)" $GITHUB_REF_NAME)" > RELEASE_NOTES'
- name: version
id: version
run: 'git describe --always --dirty $GITHUB_REF_NAME | sed "s/^v//"'
- uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ github.ref }}
body_path: RELEASE_NOTES
env:
GITHUB_TOKEN: ${{ github.token }}