Skip to content

Commit 13b1348

Browse files
committed
Update release workflow
1 parent 2ab4b9d commit 13b1348

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

.github/workflows/release.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,30 @@ jobs:
99
release:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v1
12+
- uses: actions/checkout@v2
13+
- name: Get tag
14+
id: tag
15+
run: |
16+
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
1317
- name: Set up Python 3.7
1418
uses: actions/setup-python@v1
1519
with:
1620
python-version: 3.7
1721
- name: Install dependencies
18-
run: python -m pip install --upgrade pip poetry
19-
- name: Configure pypi credentials
22+
run: python -m pip install --upgrade pip poetry --pre
23+
- name: Publish release to PyPI
2024
env:
21-
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
22-
run: poetry config http-basic.pypi __token__ "$PYPI_API_TOKEN"
23-
- name: Publish release to pypi
24-
run: poetry publish --build
25+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
26+
run: |
27+
poetry build
28+
poetry publish
29+
- name: Create Release
30+
id: create_release
31+
uses: actions/create-release@v1
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
34+
with:
35+
tag_name: ${{ steps.tag.outputs.tag }}
36+
release_name: ${{ steps.tag.outputs.tag }}
37+
draft: false
38+
prerelease: false

0 commit comments

Comments
 (0)