Files
lunasea/.github/workflows/build_web.yml
2022-04-19 01:09:01 -04:00

85 lines
2.0 KiB
YAML

name: 'Build Web'
on:
workflow_call:
inputs:
build-number:
required: true
type: string
flavor:
required: true
type: string
secrets:
FIREBASE_TOKEN:
required: true
jobs:
build-hosted:
name: Hosted
runs-on: ubuntu-latest
steps:
- name: Setup Environment
uses: JagandeepBrar/LunaSea/.github/actions/prepare_for_build@master
with:
firebase-token: ${{ secrets.FIREBASE_TOKEN }}
platform: web
- name: Build LunaSea
run: npm run build:web
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: web-hosted
path: ${{ github.workspace }}/build/web
build-archive:
name: Archive
runs-on: ubuntu-latest
steps:
- name: Setup Environment
uses: JagandeepBrar/LunaSea/.github/actions/prepare_for_build@master
with:
platform: web
- name: Build LunaSea
run: npm run build:web
- name: Create Archive
uses: thedoctor0/zip-release@0.6.2
with:
type: zip
filename: output/lunasea-web-canvaskit.zip
path: build/web
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: web-archive
path: ${{ github.workspace }}/output
build-docker:
name: Docker
runs-on: ubuntu-latest
steps:
- name: Setup Environment
uses: JagandeepBrar/LunaSea/.github/actions/prepare_for_build@master
with:
platform: web
- name: Build LunaSea
uses: docker/build-push-action@v2
with:
context: .
outputs: type=docker,dest=${{ github.workspace}}/output/lunasea-web-docker.tar
tags: |
ghcr.io/jagandeepbrar/lunasea:${{ inputs.flavor }}
ghcr.io/jagandeepbrar/lunasea:${{ github.sha }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: web-docker
path: ${{ github.workspace }}/output