Skip to content

Commit

Permalink
Merge pull request #617 from ZenUml/cicd/replace-deploy-with-github-a…
Browse files Browse the repository at this point in the history
…ctions

Cicd/replace deploy with GitHub actions
  • Loading branch information
MrCoder authored Nov 18, 2023
2 parents 6ce11e7 + 30362a3 commit 4026ea5
Showing 1 changed file with 31 additions and 35 deletions.
66 changes: 31 additions & 35 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,37 @@ on:
tags:
- release-*
jobs:
build:

build_and_deploy:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install && yarn build
- run: yarn release
- run: yarn deploy:prod --token ${{ secrets.FIREBASE_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
with:
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
asset_path: ./extension.zip
asset_name: chrome-extension.zip
asset_content_type: application/zip
- uses: actions/checkout@v2
- run: yarn install && yarn build && yarn release
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_WEB_SEQUENCE_LOCAL }}'
channelId: live
projectId: web-sequence-local
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
with:
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
asset_path: ./extension.zip
asset_name: chrome-extension.zip
asset_content_type: application/zip

0 comments on commit 4026ea5

Please sign in to comment.