Skip to content

Refactored from vite to nextjs #21

Refactored from vite to nextjs

Refactored from vite to nextjs #21

Workflow file for this run

name: Build
on:
# Allow developers to run this on-demand.
workflow_dispatch:
# Allow the release workflow to trigger this workflow.
workflow_call:
# Validate pull request to confirm that the build is still working.
pull_request:
types:
- opened
- reopened
- synchronize
# Allow at most one instance of this workflow to run at a time.
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
env:
GIT_USER_NAME: github-actions[bot]
GIT_USER_EMAIL: github-actions[bot]@users.noreply.github.com
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn
cache-dependency-path: yarn.lock
- name: Create .env file from GitHub Secrets
run: |
echo "SENTRY_INGEST_DOMAIN=${{ secrets.SENTRY_INGEST_DOMAIN }}" >> .env
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> .env
echo "SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> .env
echo "SENTRY_ORG=${{ github.repository_owner }}" >> .env
echo "SENTRY_PROJECT=${{ github.event.repository.name }}" >> .env
# https://docs.sentry.io/platforms/javascript/guides/electron/configuration/tree-shaking/
echo "__SENTRY_DEBUG__=false" >> .env
echo "__SENTRY_TRACING__=false" >> .env
- name: Install dependencies
run: yarn install
- name: Build Linux
if: matrix.os == 'ubuntu-latest'
run: yarn build:linux
- name: Build MacOS
if: matrix.os == 'macos-latest'
run: yarn build:mac && yarn sentry:sourcemaps
- name: Build Windows
if: matrix.os == 'windows-latest'
run: yarn build:win
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: phoenix-app-${{ matrix.os }}
path: |
dist/phoenix-*.snap
dist/phoenix-*.deb
dist/phoenix-*.exe
dist/phoenix-*.dmg
dist/phoenix-*.zip
retention-days: 5