Skip to content

Merge pull request #67 from Aidan-Chey/dependabot/npm_and_yarn/multi-… #59

Merge pull request #67 from Aidan-Chey/dependabot/npm_and_yarn/multi-…

Merge pull request #67 from Aidan-Chey/dependabot/npm_and_yarn/multi-… #59

name: New Sentry Release And deploy to Firebase
on:
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Use Node 20.x
uses: actions/[email protected]
with:
node-version: '20.x'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build:prod
- name: Archive build artifacts
uses: actions/[email protected]
with:
name: dist
path: dist
retention-days: 2
release:
runs-on: ubuntu-latest
needs: build
steps:
# See: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow#using-the-checkout-action
- name: Checkout
uses: actions/[email protected]
- name: Download build artifacts
uses: actions/[email protected]
with:
name: dist
path: dist
- name: Create Sentry release
uses: getsentry/[email protected]
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: firebase
sourcemaps: dist/grocerment
deploy:
runs-on: ubuntu-latest
needs: [build, release]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Download build artifacts
uses: actions/[email protected]
with:
name: dist
path: dist
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}