Skip to content

Commit 32217da

Browse files
authored
Merge pull request #619 from ZenUml/cicd/replace-deploy-with-github-actions
Upgrade firebase version
2 parents 4026ea5 + 531bbd2 commit 32217da

File tree

6 files changed

+1501
-1118
lines changed

6 files changed

+1501
-1118
lines changed

.github/workflows/deploy-prod.yml

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,41 @@ on:
88
tags:
99
- release-*
1010
jobs:
11-
build_and_deploy:
11+
build:
12+
1213
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [16.x]
18+
1319
steps:
1420
- uses: actions/checkout@v2
15-
- run: yarn install && yarn build && yarn release
16-
- uses: FirebaseExtended/action-hosting-deploy@v0
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v1
1723
with:
18-
repoToken: '${{ secrets.GITHUB_TOKEN }}'
19-
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_WEB_SEQUENCE_LOCAL }}'
20-
channelId: live
21-
projectId: web-sequence-local
22-
env:
23-
FIREBASE_CLI_PREVIEWS: hostingchannels
24+
node-version: ${{ matrix.node-version }}
25+
- run: yarn install && yarn build
26+
- run: yarn release
27+
- run: yarn deploy:prod --token ${{ secrets.FIREBASE_TOKEN }}
2428
- name: Create Release
2529
id: create_release
2630
uses: actions/create-release@v1
2731
env:
28-
GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
32+
GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
2933
with:
30-
tag_name: ${{ github.ref }}
31-
release_name: Release ${{ github.ref }}
32-
draft: false
33-
prerelease: false
34+
tag_name: ${{ github.ref }}
35+
release_name: Release ${{ github.ref }}
36+
draft: false
37+
prerelease: false
3438
- name: Upload Release Asset
3539
id: upload-release-asset
3640
uses: actions/upload-release-asset@v1
3741
env:
38-
GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
42+
GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
3943
with:
40-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
41-
asset_path: ./extension.zip
42-
asset_name: chrome-extension.zip
43-
asset_content_type: application/zip
44+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
45+
asset_path: ./extension.zip
46+
asset_name: chrome-extension.zip
47+
asset_content_type: application/zip
4448

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Deploy to Stage
5+
6+
on: [push, pull_request]
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [16.x]
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
- run: yarn install && yarn build
24+
- run: yarn release
25+
- name: Deploy to staging
26+
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' # This conditional will skip the step for Dependabot PRs
27+
run: yarn deploy:staging --token ${{ secrets.FIREBASE_TOKEN }}
28+
- name: Upload artifacts # Find artifacts under actions/jobs
29+
uses: actions/upload-artifact@v3
30+
with:
31+
name: chrome-extension
32+
path: extension

.github/workflows/firebase-hosting-merge-staging.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/firebase-hosting-pull-request-staging.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"esprima": "^4.0.0",
6767
"file-saver": "^2.0.2",
6868
"firebase": "^7.16.1",
69-
"firebase-tools": "^8.4.3",
69+
"firebase-tools": "^11.30.0",
7070
"http-server": "^0.12.3",
7171
"jszip": "^3.5.0",
7272
"preact": "10.18.1",

0 commit comments

Comments
 (0)