Cleanup release action (#217)
This commit is contained in:
parent
b1ebd2afab
commit
adaa0da649
1 changed files with 8 additions and 9 deletions
17
.github/workflows/release-containers.yml
vendored
17
.github/workflows/release-containers.yml
vendored
|
|
@ -103,7 +103,7 @@ jobs:
|
|||
make publish-ecr VERSION=${{ needs.set-version.outputs.version }} ARCH=${{ matrix.arch }}
|
||||
|
||||
- name: Push GHCR
|
||||
if: github.event_name == 'push'
|
||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||
working-directory: ./docker
|
||||
run: |
|
||||
make publish-ghcr VERSION=${{ needs.set-version.outputs.version }} ARCH=${{ matrix.arch }}
|
||||
|
|
@ -147,7 +147,7 @@ jobs:
|
|||
run: make ecr-manifest VERSION=${{ needs.set-version.outputs.version }}
|
||||
|
||||
- name: Push manifest to GHCR
|
||||
if: github.event_name == 'push'
|
||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||
working-directory: ./docker
|
||||
run: make ghcr-manifest VERSION=${{ needs.set-version.outputs.version }}
|
||||
|
||||
|
|
@ -175,12 +175,18 @@ jobs:
|
|||
release:
|
||||
needs: [set-version, build-and-push]
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Poetry
|
||||
uses: snok/install-poetry@v1
|
||||
with:
|
||||
version: 1.8.5
|
||||
|
||||
- name: Make dist
|
||||
run: make full-dist VERSION=${{ needs.set-version.outputs.version }}
|
||||
|
||||
|
|
@ -195,7 +201,6 @@ jobs:
|
|||
|
||||
- name: Generate release notes
|
||||
id: generate_release_notes
|
||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
echo "Release notes for version ${{ needs.set-version.outputs.version }}" > release_notes.md
|
||||
echo "" >> release_notes.md
|
||||
|
|
@ -204,7 +209,6 @@ jobs:
|
|||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
@ -217,7 +221,6 @@ jobs:
|
|||
|
||||
- name: Upload Release Asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
|
|
@ -228,7 +231,6 @@ jobs:
|
|||
|
||||
- name: Upload Python Tar Asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
|
|
@ -239,7 +241,6 @@ jobs:
|
|||
|
||||
- name: Upload Python Whl Asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
|
|
@ -249,13 +250,11 @@ jobs:
|
|||
asset_content_type: application/zip
|
||||
|
||||
- name: Zip Full Dist
|
||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||
run: tar -cvf python-package-distributions.tar.gz ./dist
|
||||
|
||||
|
||||
- name: Upload Full Dist
|
||||
uses: actions/upload-release-asset@v1
|
||||
if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
|
|
|
|||
Loading…
Reference in a new issue