Skip to content

Commit 9554f20

Browse files
committed
update action
1 parent 8d7c65c commit 9554f20

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

.github/workflows/release.yaml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
name: Create Release
22

3-
on:
4-
workflow_dispatch:
5-
inputs:
6-
tagname:
7-
description: 'Tag name'
8-
required: false
9-
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7+
108
jobs:
11-
create_release:
9+
build:
10+
name: Create Release
1211
runs-on: ubuntu-latest
13-
1412
steps:
15-
- name: Checkout repository
16-
uses: actions/checkout@v2
17-
- name: Create Release
18-
id: create_release
19-
uses: actions/create-release@v1
20-
env:
21-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22-
with:
23-
tag_name: ${{ github.event.inputs.tagname }}
24-
release_name: ${{ github.event.inputs.tagname }}
25-
draft: false
26-
prerelease: false
27-
generate_release_notes: true
28-
29-
- name: Set outputs for the created release
30-
run: |
31-
echo "::set-output name=release_id::${{ steps.create_release.outputs.id }}"
32-
echo "::set-output name=html_url::${{ steps.create_release.outputs.html_url }}"
33-
echo "::set-output name=upload_url::${{ steps.create_release.outputs.upload_url }}"
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
- name: Changelog
18+
uses: Bullrich/generate-release-changelog@master
19+
id: Changelog
20+
env:
21+
REPO: ${{ github.repository }}
22+
- name: Create Release
23+
id: create_release
24+
uses: actions/create-release@latest
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
27+
with:
28+
tag_name: ${{ github.ref }}
29+
release_name: Release ${{ github.ref }}
30+
body: |
31+
${{ steps.Changelog.outputs.changelog }}
32+
draft: false
33+
prerelease: false

0 commit comments

Comments
 (0)