-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (45 loc) · 1.5 KB
/
Copy pathrelease.yml
File metadata and controls
52 lines (45 loc) · 1.5 KB
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
name: Release
on:
push:
branches: [main]
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-node@v5
with:
node-version: 20
cache: yarn
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- name: Create release PR or publish
id: changesets
uses: changesets/action@v1
with:
version: yarn run prepare-release
publish: yarn run release
commit: 'chore: version packages'
title: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Deploy JSON schema to Firebase Hosting
if: steps.changesets.outputs.published == 'true'
env:
GOOGLE_APPLICATION_CREDENTIALS: secrets/hosting-service-account-prod.json
HOSTING_SERVICE_ACCOUNT_BASE64_PROD: ${{ secrets.HOSTING_SERVICE_ACCOUNT_BASE64_PROD }}
run: |
mkdir -p secrets
printf '%s' "$HOSTING_SERVICE_ACCOUNT_BASE64_PROD" | base64 -d > secrets/hosting-service-account-prod.json
npx firebase use prod
npx firebase deploy --only hosting
rm -f secrets/hosting-service-account-prod.json