-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (63 loc) · 2.14 KB
/
firebase-hosting-merge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# 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