feat: mass upgrade for nov 2023 #28
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 file was auto-generated by the Firebase CLI | |
# https://github.com/firebase/firebase-tools | |
name: Deploy to Firebase Hosting on merge | |
'on': | |
push: | |
branches: | |
- main | |
jobs: | |
pre_check: | |
runs-on: ubuntu-latest | |
outputs: | |
new_release_published: ${{ steps.semantic.outputs.new_release_published }} | |
new_release_version: ${{ steps.semantic.outputs.new_release_version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
cache-dependency-path: yarn.lock | |
- run: yarn install --frozen-lockfile | |
- name: Semantic Release | |
id: semantic | |
uses: cycjimmy/semantic-release-action@v3 | |
with: | |
semantic_version: 19.0.5 | |
dry_run: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
needs: [ pre_check ] | |
if: needs.pre_check.outputs.new_release_published == 'true' | |
outputs: | |
new_release_published: ${{ needs.pre_check.outputs.new_release_published }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
cache-dependency-path: yarn.lock | |
- run: yarn install --frozen-lockfile | |
- name: Semantic Release | |
id: semantic | |
uses: cycjimmy/semantic-release-action@v3 | |
with: | |
semantic_version: 19.0.5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set package.json version | |
run: npm version ${{ steps.semantic.outputs.new_release_version }} --no-git-tag-version | |
- run: yarn run build | |
- name: Determine version | |
run: echo "SOURCE_VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV | |
- name: Determine version | |
run: echo "Deploying version $SOURCE_VERSION" | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GLORAT_GPTAPPS }}' | |
channelId: live | |
projectId: glorat-gptapps |