File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ # from https://github.com/RF-Tar-Railt/nonebot-plugin-template/blob/main/.github/workflows/release.yml
2+ name : Release action
3+
4+ on :
5+ push :
6+ tags :
7+ - v*
8+
9+ jobs :
10+ release :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ id-token : write
14+ contents : write
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - name : Setup Python environment
19+ uses : ./.github/actions/setup-python
20+
21+ - name : Get Version
22+ id : version
23+ run : |
24+ echo "VERSION=$(pdm show --version)" >> $GITHUB_OUTPUT
25+ echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
26+ echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
27+
28+ - name : Check Version
29+ if : steps.version.outputs.VERSION != steps.version.outputs.TAG_VERSION
30+ run : exit 1
31+
32+ - name : Publish Package
33+ run : |
34+ pdm publish
35+ gh release upload --clobber ${{ steps.version.outputs.TAG_NAME }} dist/*.tar.gz dist/*.whl
36+ env :
37+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments