diff --git a/.github/workflows/release_kolibri.yml b/.github/workflows/release_kolibri.yml index 22000602bec..0cbce29b10e 100644 --- a/.github/workflows/release_kolibri.yml +++ b/.github/workflows/release_kolibri.yml @@ -128,6 +128,38 @@ jobs: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} TESTPYPI_API_TOKEN: ${{ secrets.TESTPYPI_API_TOKEN }} PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + gcs_upload: + name: Upload to Google Cloud Storage for LE Downloads + runs-on: ubuntu-latest + needs: [whl, pex, dmg, deb, exe, zip, apk] + strategy: + matrix: + filename: [ + '${{ needs.whl.outputs.whl-file-name }}', + '${{ needs.whl.outputs.tar-file-name }}', + '${{ needs.pex.outputs.pex-file-name }}', + '${{ needs.dmg.outputs.dmg-file-name }}', + '${{ needs.deb.outputs.deb-file-name }}', + '${{ needs.exe.outputs.exe-file-name }}', + '${{ needs.zip.outputs.zip-file-name }}', + '${{ needs.apk.outputs.apk-file-name }}', + ] + steps: + - name: Download ${{ matrix.filename }} artifact + uses: actions/download-artifact@v4 + with: + name: ${{ matrix.filename }} + path: dist + - uses: 'google-github-actions/auth@v2' + with: + credentials_json: '${{ secrets.GH_UPLOADER_GCP_SA_CREDENTIALS }}' + - name: 'Set up Cloud SDK' + uses: 'google-github-actions/setup-gcloud@v2' + - name: Upload files to Google Cloud Storage + uses: 'google-github-actions/upload-cloud-storage@v2' + with: + path: 'dist/${{ matrix.filename }}' + destination: '${{ secrets.KOLIBRI_PUBLIC_RELEASE_GCS_BUCKET }}/downloads/kolibri/${{ github.event.release.name }}' block_release_step: # This step ties to the release environment which requires manual approval # before it can execute. Once manual approval has been granted, the release is @@ -153,45 +185,27 @@ jobs: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} TESTPYPI_API_TOKEN: ${{ secrets.TESTPYPI_API_TOKEN }} PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} - gcs_upload: - name: Upload to Google Cloud Storage - if: ${{ !github.event.release.prerelease }} + bck_gcs_upload: + name: Upload WHL file to Google Cloud Storage for BCK + if: ${{ !github.event.release.prerelease && github.event.release.name == 'latest'}} runs-on: ubuntu-latest - needs: [block_release_step, whl, pex, dmg, deb, exe, zip, apk] - strategy: - matrix: - filename: [ - '${{ needs.whl.outputs.whl-file-name }}', - '${{ needs.whl.outputs.tar-file-name }}', - '${{ needs.pex.outputs.pex-file-name }}', - '${{ needs.dmg.outputs.dmg-file-name }}', - '${{ needs.deb.outputs.deb-file-name }}', - '${{ needs.exe.outputs.exe-file-name }}', - '${{ needs.zip.outputs.zip-file-name }}', - '${{ needs.apk.outputs.apk-file-name }}', - ] + needs: [block_release_step, whl] steps: - - name: Download ${{ matrix.filename }} artifact + - name: Download WHL artifact uses: actions/download-artifact@v4 with: - name: ${{ matrix.filename }} + name: ${{ needs.whl.outputs.whl-file-name }} path: dist - uses: 'google-github-actions/auth@v2' with: credentials_json: '${{ secrets.GH_UPLOADER_GCP_SA_CREDENTIALS }}' - name: 'Set up Cloud SDK' uses: 'google-github-actions/setup-gcloud@v2' - - name: Upload files to Google Cloud Storage - uses: 'google-github-actions/upload-cloud-storage@v2' - with: - path: 'dist/${{ matrix.filename }}/${{ matrix.filename }}' - destination: '${{ secrets.KOLIBRI_PUBLIC_RELEASE_GCS_BUCKET }}/downloads/kolibri/${{ github.event.release.name }}/${{ matrix.filename }}' - name: Upload to BCK bucket - if: ${{ github.event.release.name == 'latest' }} && ${{ endsWith(matrix.filename, '.whl') }} uses: 'google-github-actions/upload-cloud-storage@v2' with: - path: 'dist/${{ matrix.filename }}/${{ matrix.filename }}' - destination: '${{ secrets.BCK_PROD_BUILD_ARTIFACT_GCS_BUCKET }}/${{ matrix.filename }}' + path: 'dist/${{ needs.whl.outputs.whl-file-name }}' + destination: '${{ secrets.BCK_PROD_BUILD_ARTIFACT_GCS_BUCKET }}' android_release: name: Release Android App if: ${{ !github.event.release.prerelease }}