Skip to content

Commit cf8774a

Browse files
build: add action for GitHub releases
1 parent 92e8897 commit cf8774a

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: release
2+
3+
on:
4+
workflow_run:
5+
workflows: [ "tests" ]
6+
branches: [ "main" ]
7+
types:
8+
- completed
9+
10+
workflow_dispatch:
11+
12+
jobs:
13+
14+
github-release:
15+
runs-on: ubuntu-latest
16+
17+
environment:
18+
name: Staging
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: conventional Changelog Action
24+
id: changelog
25+
uses: TriPSs/[email protected]
26+
with:
27+
github-token: ${{ secrets.CHANGELOG_RELEASE }}
28+
git-user-name: Google GitHub Actions Bot
29+
git-user-email: [email protected]
30+
git-message: 'release: {version}'
31+
version-file: ./pyproject.toml
32+
version-path: project.version
33+
release-count: 0
34+
35+
- name: create release
36+
uses: actions/create-release@v1
37+
if: ${{ steps.changelog.outputs.skipped == 'false' }}
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.CHANGELOG_RELEASE }}
40+
with:
41+
tag_name: ${{ steps.changelog.outputs.tag }}
42+
release_name: ${{ steps.changelog.outputs.tag }}
43+
body: ${{ steps.changelog.outputs.clean_changelog }}

0 commit comments

Comments
 (0)