Skip to content

Commit

Permalink
Add tagged version support to deploy-web job
Browse files Browse the repository at this point in the history
  • Loading branch information
pierd committed Sep 11, 2023
1 parent 023cee5 commit 224d0e4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/deploy-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,19 @@ jobs:
path: "./web/${{ env.PACKAGE_NAME }}"
destination: "ambient-artifacts/ambient-web-clients/ambient-canary"
parent: false

- name: Get tagged version
# ref example: refs/tags/v0.3.0-nightly-2023-09-05
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
run:
echo "tagged_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV

- name: Upload tagged version to Google Cloud
# Only upload if triggered for a tag
if: startsWith(github.ref, 'refs/tags/v')
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "./web/${{ env.PACKAGE_NAME }}"
destination: "ambient-artifacts/ambient-web-clients/ambient-web-${{ env.tagged_version }}"
parent: false

0 comments on commit 224d0e4

Please sign in to comment.