chore(deps): update babel monorepo to v7.26.0 #579
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Release | |
on: | |
push: | |
branches: | |
- '*' | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if GitHub PAT is valid | |
run: | | |
response=$(curl -o /dev/null -s -w "%{http_code}\n" \ | |
-H "Authorization: token ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/user) | |
if [ "$response" -ne 200 ]; then | |
echo "GitHub PAT is invalid or expired" | |
exit 1 | |
fi | |
- uses: actions/checkout@v4 | |
- name: Setup gcloud environment | |
uses: google-github-actions/setup-gcloud@v2 | |
with: | |
# The service account key which will be used for authentication. | |
service_account_key: ${{ secrets.GCLOUD_SERVICE_KEY }} | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- run: npm ci | |
- name: Run semantic-release | |
run: npx semantic-release | |
env: | |
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # https://bit.ly/3cllYHl | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: | | |
npm run build | |
npm test | |
if: ${{ github.event_name == 'pull_request' }} | |
- run: | | |
echo $GITHUB_REF | |
PATCH_VERSION=${GITHUB_REF/refs\/tags\/v/} | |
MINOR_VERSION=${PATCH_VERSION%.*} | |
echo $PATCH_VERSION | |
echo $MINOR_VERSION | |
echo ${{ github.event_name }} | |
- name: Build and Upload | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: | | |
npm run build | |
PATCH_VERSION=${GITHUB_REF/refs\/tags\/v/} | |
MINOR_VERSION=${PATCH_VERSION%.*} | |
echo $PATCH_VERSION | |
echo $MINOR_VERSION | |
# https://bit.ly/2xzjGVO | |
gsutil cp -r dist gs://cdn.hackforplay.xyz/common/${PATCH_VERSION} | |
gsutil cp -r 'dist/**' gs://cdn.hackforplay.xyz/common/${MINOR_VERSION} | |
gsutil cp -r 'dist/ja/*' gs://cdn.hackforplay.xyz/common/${MINOR_VERSION}/ja/ |