-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (71 loc) · 2.35 KB
/
release.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
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Release Events
on:
release:
types: [published]
workflow_dispatch:
inputs:
environment:
description: 'Environment to run tests against'
type: environment
required: true
permissions:
id-token: write
deployments: write
jobs:
deploy-dev:
name: Deploy to staging
runs-on: ubuntu-latest
environment:
name: dev
url: https://plss.dev.utah.gov
if: github.event.release.prerelease == true
steps:
- name: 🚀 Deploy
uses: agrc/firebase-website-deploy-composite-action@v1
with:
identity-provider: ${{ secrets.IDENTITY_PROVIDER }}
service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }}
project-id: ${{ secrets.PROJECT_ID }}
build-command: npm run build
env:
VITE_FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }}
VITE_DISCOVER_KEY: ${{ secrets.VITE_DISCOVER_KEY }}
VITE_API_KEY: ${{ secrets.VITE_UGRC_API_KEY }}
deploy-prod:
name: Deploy to production
runs-on: ubuntu-latest
environment:
name: prod
url: https://plss.utah.gov
if: github.event.release.prerelease == false
steps:
- name: 🚀 Deploy
uses: agrc/firebase-website-deploy-composite-action@v1
with:
identity-provider: ${{ secrets.IDENTITY_PROVIDER }}
service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }}
project-id: ${{ secrets.PROJECT_ID }}
service-now-instance: ${{ secrets.SN_INSTANCE }}
service-now-table: ${{ secrets.SN_TABLE }}
service-now-system-id: ${{ secrets.SN_SYS_ID }}
service-now-username: ${{ secrets.SN_USERNAME }}
service-now-password: ${{ secrets.SN_PASSWORD }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
build-command: npm run build
env:
VITE_FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }}
VITE_DISCOVER_KEY: ${{ secrets.VITE_DISCOVER_KEY }}
VITE_API_KEY: ${{ secrets.VITE_UGRC_API_KEY }}
notify:
name: Notifications
runs-on: ubuntu-latest
needs: [deploy-prod]
permissions:
contents: read
pull-requests: write
issues: write
steps:
- name: 💬 Comment on issues in release
uses: agrc/release-issue-notifications-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}