Skip to content

Upload minified files to GCS #33

Upload minified files to GCS

Upload minified files to GCS #33

Workflow file for this run

name: Upload minified files to GCS
on:
workflow_dispatch:
inputs:
package:
type: choice
description: Select package
options:
- '@inworld/web-core'
- '@inworld/web-threejs'
version:
type: string
description: "The version of package to minify. The version should be the same as version in package.json. For example, 1.0.0. Otherwise, the latest version will be used."
required: false
env:
AUTH_SERVICE_ACCOUNT: [email protected]
AUTH_IDENTITY_PROVIDER: projects/678423885598/locations/global/workloadIdentityPools/github-devops-pool/providers/github-prvdr
TAG: ''
jobs:
minify:
runs-on: [self-hosted, linux, x64, kubernetes, ephemeral]
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set TAG from inputs
run: echo "TAG=refs/tags/${{ inputs.package }}@${{ inputs.version }}" >> $GITHUB_ENV
if: inputs.version != ''
- name: Set env from GITHUB_REF
run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
if: inputs.version == ''
- name: Test
run: |
echo $TAG
echo ${{ env.TAG }}
echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME"
echo "Tag name from github.ref_name: ${{ github.ref_name }}"
# - name: Checkout source code
# uses: actions/checkout@v4
# with:
# ref: ${{ env.TAG }}
# fetch-tags: true
# - name: Run build
# uses: ./.github/actions/build_package
# with:
# package: ${{ inputs.package }}
# - name: Minify and upload
# uses: ./.github/actions/minify
# with:
# package: ${{ inputs.package }}
# env:
# AUTH_SERVICE_ACCOUNT: ${{ env.AUTH_SERVICE_ACCOUNT }}
# AUTH_IDENTITY_PROVIDER: ${{ env.AUTH_IDENTITY_PROVIDER }}