Skip to content

Commit

Permalink
Merge pull request #14 from svsticky/refactor
Browse files Browse the repository at this point in the history
Frontend and backend rewrite
  • Loading branch information
TobiasDeBruijn authored Oct 27, 2024
2 parents 58400e9 + b3a44b6 commit a421c4d
Show file tree
Hide file tree
Showing 85 changed files with 6,196 additions and 2,761 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: release
on:
push:
tags:
- '**'

jobs:
build-server-musl:
name: build-server-musl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup toolchain install stable --profile minimal
- run: rustup target add x86_64-unknown-linux-musl --toolchain stable
- run: sudo apt install gcc musl-tools cmake clang
- uses: Swatinem/[email protected]
with:
workspaces: "server"
save-if: ${{ github.ref == 'refs/heads/master' }}
- run: cargo build --release --target x86_64-unknown-linux-musl
working-directory: server
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: server-x86_64-unknown-linux-musl
path: ./server/target/x86_64-unknown-linux-musl/release/digidecs

build-frontend:
name: build-frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node.js 21
uses: actions/setup-node@v3
with:
node-version: 21.x
- name: Run install
uses: borales/actions-yarn@v4
with:
dir: frontend
cmd: install
- name: Build
uses: borales/actions-yarn@v4
with:
dir: frontend
cmd: build
- run: tar -czf frontend.tar.gz dist/*
working-directory: frontend
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: frontend.tar.gz
path: ./frontend/frontend.tar.gz


create-release:
name: create-release
needs:
- build-server-musl
- build-frontend
runs-on: ubuntu-latest
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3

- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false

- run: mv server-x86_64-unknown-linux-musl/digidecs server-x86_64-unknown-linux-musl/server-x86_64-unknown-linux-musl

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
server-x86_64-unknown-linux-musl/server-x86_64-unknown-linux-musl
frontend.tar.gz/frontend.tar.gz
53 changes: 53 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: test
on:
push: {}

jobs:
server-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup toolchain install stable --profile minimal
- run: rustup component add rustfmt
- uses: Swatinem/[email protected]
with:
workspaces: "server"
save-if: ${{ github.ref == 'refs/heads/master' }}
- run: cargo fmt --all --check
working-directory: server

server-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/[email protected]
with:
workspaces: "server"
save-if: ${{ github.ref == 'refs/heads/master' }}
- run: cargo test
working-directory: server

server-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup toolchain install stable --profile minimal
- run: rustup component add clippy
- uses: Swatinem/[email protected]
with:
workspaces: "server"
save-if: ${{ github.ref == 'refs/heads/master' }}
- run: cargo clippy
working-directory: server

frontend-eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install modules
working-directory: frontend
run: yarn
- name: Run eslint
working-directory: frontend
run: yarn eslint
2 changes: 0 additions & 2 deletions .gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

35 changes: 0 additions & 35 deletions README.md

This file was deleted.

5 changes: 0 additions & 5 deletions composer.json

This file was deleted.

Loading

0 comments on commit a421c4d

Please sign in to comment.