Skip to content

Commit 4026ea5

Browse files
authored
Merge pull request #617 from ZenUml/cicd/replace-deploy-with-github-actions
Cicd/replace deploy with GitHub actions
2 parents 6ce11e7 + 30362a3 commit 4026ea5

File tree

1 file changed

+31
-35
lines changed

1 file changed

+31
-35
lines changed

.github/workflows/deploy-prod.yml

Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,37 @@ on:
88
tags:
99
- release-*
1010
jobs:
11-
build:
12-
11+
build_and_deploy:
1312
runs-on: ubuntu-latest
14-
15-
strategy:
16-
matrix:
17-
node-version: [16.x]
18-
1913
steps:
20-
- uses: actions/checkout@v2
21-
- name: Use Node.js ${{ matrix.node-version }}
22-
uses: actions/setup-node@v1
23-
with:
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 }}
28-
- name: Create Release
29-
id: create_release
30-
uses: actions/create-release@v1
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
33-
with:
34-
tag_name: ${{ github.ref }}
35-
release_name: Release ${{ github.ref }}
36-
draft: false
37-
prerelease: false
38-
- name: Upload Release Asset
39-
id: upload-release-asset
40-
uses: actions/upload-release-asset@v1
41-
env:
42-
GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
43-
with:
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
14+
- uses: actions/checkout@v2
15+
- run: yarn install && yarn build && yarn release
16+
- uses: FirebaseExtended/action-hosting-deploy@v0
17+
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+
- name: Create Release
25+
id: create_release
26+
uses: actions/create-release@v1
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
29+
with:
30+
tag_name: ${{ github.ref }}
31+
release_name: Release ${{ github.ref }}
32+
draft: false
33+
prerelease: false
34+
- name: Upload Release Asset
35+
id: upload-release-asset
36+
uses: actions/upload-release-asset@v1
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
39+
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
4844

0 commit comments

Comments
 (0)