build: adds (disabled) post-build step to update deployed version file
@@ -199,3 +199,31 @@ jobs:
echo "upload to $target complete." ||
echo "upload to $target failed.";
exit $exitcode
+
+
+ after:
+ runs-on: ubuntu-latest
+ needs: [urbit, mingw]
+ # disabled due to missing storage.objects.delete access
+ if: false
+ steps:
+ - uses: google-github-actions/setup-gcloud@v0.2.0
+ if: env.DO_UPLOAD == 'true'
+ with:
+ version: '290.0.1'
+ service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }}
+ project_id: ${{ secrets.GCS_PROJECT }}
+ export_default_credentials: true
+
+ - name: update latest deployed version
+ if: env.DO_UPLOAD == 'true'
+ run: |
+ target="gs://${UPLOAD_BASE}/last"
+ echo -n "${GITHUB_SHA:0:9}" > ./last-version
+ gsutil cp ./last-version "$target"
+ exitcode=$?
+
+ test $exitcode -eq 0 &&
+ echo "upload to $target complete." ||
+ echo "upload to $target failed.";
+ exit $exitcode
