Skip to content

Commit 7b9108d

Browse files
committed
build: fix docker release
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent ea206b8 commit 7b9108d

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,18 +120,36 @@ jobs:
120120
prerelease: ${{ github.event.inputs.prerelease }}
121121
prerelease_token: ${{ github.event.inputs.prerelease_token }}
122122
- name: Publish package distributions to PyPI
123-
if: steps.release.outputs.released == 'true'
123+
if: |
124+
!failure() && !cancelled() &&
125+
steps.after-release.outputs.released == 'true'
124126
# see https://github.com/pypa/gh-action-pypi-publish
125127
uses: pypa/gh-action-pypi-publish@release/v1
126128
with:
127129
password: ${{ secrets.PYPI_TOKEN }}
128130
- name: Publish package distributions to GitHub Releases
129-
if: steps.release.outputs.released == 'true'
131+
if: |
132+
!failure() && !cancelled() &&
133+
steps.after-release.outputs.released == 'true'
130134
# see https://github.com/python-semantic-release/upload-to-gh-release
131135
uses: python-semantic-release/upload-to-gh-release@main
132136
with:
133137
github_token: ${{ secrets.GITHUB_TOKEN }}
134138
tag: ${{ steps.release.outputs.tag }}
139+
- name: Artifact python dist
140+
if: |
141+
!failure() && !cancelled() &&
142+
steps.after-release.outputs.released == 'true'
143+
# see https://github.com/actions/upload-artifact
144+
uses: actions/upload-artifact@v3
145+
with:
146+
name: ${{ env.DIST_ARTIFACT }}
147+
path: ${{ env.DIST_DIR }}/
148+
if-no-files-found: error
149+
# Dist results are required for further processing.
150+
# Therefore, make sure that python-semantic-release is configuret to keep dist.
151+
# see https://python-semantic-release.readthedocs.io/en/latest/configuration.html?highlight=remove_dist#remove-dist
152+
135153

136154
release-DockerHub:
137155
name: "Release: DockerHub"

0 commit comments

Comments
 (0)