Skip to content

Commit 6a1e6d1

Browse files
updated release process
1 parent 7da4f84 commit 6a1e6d1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/cicd.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
uses: actions/checkout@v2
1010
- name: Set package version
1111
run: sed -i "s/^version.*/version = ${GITHUB_REF#refs/*/}/" setup.cfg
12-
if: startsWith(github.ref, 'refs/tags/')
12+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
1313
- name: Update build tools
1414
run: python3 -m pip install -U pip && python3 -m pip install -U build wheel
1515
- name: Build package
@@ -42,7 +42,7 @@ jobs:
4242
name: Release
4343
runs-on: ubuntu-latest
4444
needs: test
45-
if: startsWith(github.ref, 'refs/tags/')
45+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
4646
steps:
4747
- name: Download artifacts
4848
uses: actions/download-artifact@v2
@@ -56,3 +56,7 @@ jobs:
5656
TWINE_USERNAME: __token__
5757
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
5858
run: python -m twine upload dist/*
59+
- name: Create release
60+
uses: softprops/action-gh-release@v1
61+
with:
62+
files: dist/*

0 commit comments

Comments
 (0)