Skip to content

Commit c451240

Browse files
authored
ci: auto create release when merged to main (#3)
1 parent 863362e commit c451240

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Read version from pyproject.toml
17+
id: get_version
18+
run: |
19+
echo "VERSION=$(grep '^version =' pyproject.toml | cut -d ' ' -f 3)" >> $GITHUB_ENV
20+
21+
- name: Create Release
22+
uses: softprops/action-gh-release@v2
23+
with:
24+
tag_name: ${{ env.VERSION }}
25+
release_name: Release ${{ env.VERSION }}
26+
draft: false
27+
prerelease: false
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)