From 3bd56b295d6eba6d8a79160113397cca43e1dbff Mon Sep 17 00:00:00 2001 From: Sterling Dreyer Date: Wed, 9 Oct 2024 14:19:38 -0700 Subject: [PATCH] Release on tag and upload full dist (#98) --- .github/workflows/release-containers.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-containers.yml b/.github/workflows/release-containers.yml index 802192c3..006d472b 100644 --- a/.github/workflows/release-containers.yml +++ b/.github/workflows/release-containers.yml @@ -94,7 +94,7 @@ jobs: - name: Generate release notes id: generate_release_notes - if: github.event_name != 'push' + if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/') run: | echo "Release notes for version ${{ env.VERSION }}" > release_notes.md echo "" >> release_notes.md @@ -103,7 +103,7 @@ jobs: - name: Create Release id: create_release - if: github.event_name != 'push' + if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/') uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -116,7 +116,7 @@ jobs: - name: Upload Release Asset uses: actions/upload-release-asset@v1 - if: github.event_name != 'push' + if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -127,7 +127,7 @@ jobs: - name: Upload Python Tar Asset uses: actions/upload-release-asset@v1 - if: github.event_name != 'push' + if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -138,7 +138,7 @@ jobs: - name: Upload Python Whl Asset uses: actions/upload-release-asset@v1 - if: github.event_name != 'push' + if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -147,6 +147,17 @@ jobs: asset_name: ${{ env.WHL_NAME }} asset_content_type: application/zip + - 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: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./dist/${{ env.WHL_NAME }} + asset_name: python-package-distributions.tar.gz + asset_content_type: application/zip + - name: Upload the distribution packages uses: actions/upload-artifact@v4 with: