Skip to content

Commit

Permalink
CI: add process of downloading integrated frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
yhsphd committed Jun 4, 2024
1 parent f08eff8 commit c6ededd
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 33 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/build.yml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Continuous Integration
on: ["push", "pull_request"]

permissions:
contents: write
pull-requests: read

jobs:
build-and-release:
runs-on: ubuntu-latest

steps:
#####################
# Setup Environment #
#####################

- name: Checkout code
uses: actions/checkout@v4

- name: Use Node.js 18.x (This is the last major version that pkg supports)
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: "npm"

######################
# Check Version Bump #
######################

- name: Check if version has been updated
id: check
uses: EndBug/version-check@v2

- name: Log when changed
if: steps.check.outputs.changed == 'true'
run: 'echo "Version change found in commit ${{ steps.check.outputs.commit }}! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'

- name: Log when unchanged
if: steps.check.outputs.changed == 'false'
run: 'echo "No version change :/"'

#########
# Build #
#########

- name: Download dependencies
run: npm ci

- name: Download latest release of kdc-overlay-front
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "Duo-Cup-Korea/kdc-overlay-front"
file: "kdc-overlay-front.zip"
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install frontend to the public folder
run: |
mkdir public
unzip kdc-overlay-front.zip -d public
- name: Build
run: npm run build --if-present
# run: npm test

- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: kdc-overlay
path: dist/kdc-overlay.exe

0 comments on commit c6ededd

Please sign in to comment.