Skip to content

Commit 38c5174

Browse files
authored
Fix release workflow (#120)
1 parent 39d1360 commit 38c5174

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
tags:
6-
- v*
6+
- v*.*.*
77
workflow_dispatch:
88

99
jobs:
@@ -48,6 +48,7 @@ jobs:
4848
uses: actions/[email protected]
4949
with:
5050
name: poetry-build
51+
path: dist
5152

5253
- name: Get changes
5354
if: github.event_name == 'push'
@@ -65,19 +66,19 @@ jobs:
6566
cat RELEASE.md
6667
6768
- name: Generate token
69+
if: success() && github.event_name == 'push'
6870
id: generate-token
6971
uses: tibdex/[email protected]
7072
with:
7173
app_id: ${{ secrets.APP_ID }}
7274
private_key: ${{ secrets.APP_PRIVATE_KEY }}
7375

7476
- name: Create release
75-
if: success()
77+
if: success() && github.event_name == 'push'
7678
uses: softprops/action-gh-release@v1
7779
with:
7880
token: ${{ steps.generate-token.outputs.token }}
7981
body_path: RELEASE.md
80-
draft: github.event_name == 'workflow_dispatch'
8182
prerelease: ${{ contains(github.ref, '-') }}
8283
files: dist/*
8384

@@ -87,6 +88,15 @@ jobs:
8788
needs: build
8889

8990
steps:
91+
- name: Checkout
92+
uses: actions/[email protected]
93+
94+
- name: Download build artifacts
95+
uses: actions/[email protected]
96+
with:
97+
name: poetry-build
98+
path: dist
99+
90100
- name: Set up Python
91101
uses: actions/[email protected]
92102

@@ -96,11 +106,6 @@ jobs:
96106
virtualenvs-create: true
97107
virtualenvs-in-project: true
98108

99-
- name: Download build artifacts
100-
uses: actions/[email protected]
101-
with:
102-
name: poetry-build
103-
104109
- name: Publish to PyPI
105110
if: success() && github.event_name == 'push'
106111
run: |

0 commit comments

Comments
 (0)