Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4 Setup #33

Merged
merged 4 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-server:
name: Server
runs-on: ubuntu-latest
container: golang:alpine
steps:
- uses: actions/checkout@v4
- uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@v5
- run: task server:build
- uses: actions/upload-artifact@v4
with:
path: server/build/botw-iss
name: server
retention-days: 3

build-manual:
name: Manual
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: cargo-bins/cargo-binstall@main
- run: cargo-binstall --no-confirm mdbook
- run: task manual:build
- uses: actions/upload-artifact@v4
with:
path: manual/book
name: manual
retention-days: 3

build-legacy:
name: Legacy App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/setup-node@v4
with:
node-version: 18.x
- run: task leg:ci
- run: task leg:build
- uses: actions/upload-artifact@v4
with:
path: legacy/dist
name: legacy
retention-days: 3


40 changes: 40 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Check
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
check-server:
name: Server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@v5
- run: task server:check

check-legacy:
name: Legacy App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/setup-node@v4
with:
node-version: 18.x
- run: task leg:ci
- run: task leg:test
- run: task leg:check
54 changes: 54 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Docker
on:
workflow_dispatch:
inputs:
version:
description: "Version tag of the image (e.g. 4.0.0-alpha)"
required: true

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-docker:
name: Publish Docker Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: build.yml
commit: ${{ github.sha }}
path: server/dist
# - run: task make-version-ci -- ${{ github.event.inputs.version }} ${{ github.sha }}
# working-directory: docker
- uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v3
- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
type=sha,format=long
type=raw,value=${{ github.event.inputs.version }}
type=raw,value=latest
- uses: docker/build-push-action@v5
with:
push: true
context: server
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
88 changes: 0 additions & 88 deletions .github/workflows/main.yml

This file was deleted.

42 changes: 12 additions & 30 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,17 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local
.eslintcache

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

debug.ast.json
ast.generated.ts

# Dev certificates
/cert
*.pem
*.pfx
*.key

# Task runner
.task

# Cache
.eslintcache

# (temporary)
/next

/.task
# Cargo
/target
4 changes: 0 additions & 4 deletions .prettierrc.cjs

This file was deleted.

Loading
Loading