mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-23 11:44:19 +01:00
[CI] prevent pypi upload on pre-releases (#520)
* prevent pypi upload on pre-releases * only on release
This commit is contained in:
4
.github/workflows/docker.yaml
vendored
4
.github/workflows/docker.yaml
vendored
@@ -2,7 +2,7 @@ name: Docker Build
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
types: [released]
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name == 'release' }}
|
||||
push: ${{ github.event_name == 'release' && github.event.action == 'released' }}
|
||||
tags: ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:${{ steps.get_tag.outputs.tag }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
|
||||
4
.github/workflows/pypi.yaml
vendored
4
.github/workflows/pypi.yaml
vendored
@@ -3,7 +3,7 @@ name: Pip package
|
||||
on:
|
||||
push:
|
||||
release:
|
||||
types: [published]
|
||||
types: [released]
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
@@ -30,6 +30,6 @@ jobs:
|
||||
pip install --upgrade dist/*.whl
|
||||
|
||||
- name: Upload to PyPI on release
|
||||
if: github.event_name == 'release'
|
||||
if: github.event_name == 'release' && github.event.action == 'released'
|
||||
run: |
|
||||
poetry publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user