Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next attempt at fixing GCS upload #12069

Merged
merged 1 commit into from
May 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 40 additions & 26 deletions .github/workflows/release_kolibri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
Loading