-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (32 loc) · 996 Bytes
/
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
39
40
name: Release
on:
push:
tags:
- '*.*.*'
jobs:
build:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Package
run: make dist VERSION="$GITHUB_REF_NAME"
- name: Changelog
id: changelog
run: |
echo "contents<<CHANGELOGEOF" >> $GITHUB_OUTPUT
sed -e '1,/##/d' -e '/##/,$d' CHANGELOG.md >> $GITHUB_OUTPUT
echo "CHANGELOGEOF" >> $GITHUB_OUTPUT
- name: Create release
id: create_release
uses: shogo82148/actions-create-release@v1
with:
body: ${{ steps.changelog.outputs.contents }}
- name: Upload package
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/dist/git-draft.zip
asset_name: git-draft.zip
asset_content_type: application/zip