Cleanup & refactor
This commit is contained in:
parent
d3b6212463
commit
2a6907434a
50 changed files with 937 additions and 4110 deletions
98
.forgejo/workflows/ci.yml
Normal file
98
.forgejo/workflows/ci.yml
Normal file
|
@ -0,0 +1,98 @@
|
|||
name: Continous Integration
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: docker
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:act-24.04
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rokit
|
||||
uses: https://github.com/CompeyDev/setup-rokit@v0.1.2
|
||||
with:
|
||||
token: ${{ secrets.githubtoken }}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
lune run build
|
||||
|
||||
- name: Upload Build Artifact
|
||||
uses: https://git.devmarked.win/actions/upload-artifact@v4
|
||||
with:
|
||||
name: build
|
||||
path: hammer.rbxm
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: docker
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:act-24.04
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rokit
|
||||
uses: https://github.com/CompeyDev/setup-rokit@v0.1.2
|
||||
with:
|
||||
token: ${{ secrets.githubtoken }}
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
selene lib/
|
||||
|
||||
style:
|
||||
name: Styling
|
||||
runs-on: docker
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:act-24.04
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check code style
|
||||
uses: https://github.com/JohnnyMorganz/stylua-action@v4
|
||||
with:
|
||||
token: ${{ secrets.githubtoken }}
|
||||
version: v2.1.0
|
||||
args: --check lib/
|
||||
|
||||
test:
|
||||
name: Unit Testing
|
||||
runs-on: docker
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:act-24.04
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Luau
|
||||
uses: https://github.com/EncodedVenom/install-luau@v4
|
||||
|
||||
- name: Install Rokit
|
||||
uses: https://github.com/CompeyDev/setup-rokit@v0.1.2
|
||||
with:
|
||||
token: ${{ secrets.githubtoken }}
|
||||
|
||||
- name: Install Packages
|
||||
run: |
|
||||
pesde install
|
||||
|
||||
- name: Run Unit Tests
|
||||
run: |
|
||||
output=$(luau test/tests.luau)
|
||||
echo "$output"
|
||||
if [[ "$output" == *"0 fails"* ]]; then
|
||||
echo "Unit Tests Passed"
|
||||
else
|
||||
echo "Error: One or More Unit Tests Failed."
|
||||
exit 1
|
||||
fi
|
82
.forgejo/workflows/release.yml
Normal file
82
.forgejo/workflows/release.yml
Normal file
|
@ -0,0 +1,82 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ["v*"]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: docker
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:act-24.04
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rokit
|
||||
uses: https://github.com/CompeyDev/setup-rokit@v0.1.2
|
||||
with:
|
||||
token: ${{ secrets.githubtoken }}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
lune run build
|
||||
|
||||
- name: Upload Build Artifact
|
||||
uses: https://git.devmarked.win/actions/upload-artifact@v4
|
||||
with:
|
||||
name: build
|
||||
path: hammer.rbxm
|
||||
|
||||
release:
|
||||
name: Release
|
||||
needs: [build]
|
||||
runs-on: docker
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:act-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download Build
|
||||
uses: https://git.devmarked.win/actions/download-artifact@v4
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
|
||||
- name: Create Release
|
||||
uses: actions/forgejo-release@v2
|
||||
with:
|
||||
direction: upload
|
||||
title: Hammer ${{ github.ref_name }}
|
||||
release-dir: build
|
||||
|
||||
publish:
|
||||
name: Publish
|
||||
needs: [release]
|
||||
runs-on: docker
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:act-24.04
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rokit
|
||||
uses: https://github.com/CompeyDev/setup-rokit@v0.1.2
|
||||
with:
|
||||
token: ${{ secrets.githubtoken }}
|
||||
|
||||
- name: Wally Login
|
||||
run: wally login --token ${{ secrets.WALLY_AUTH_TOKEN }}
|
||||
|
||||
- name: Wally Publish
|
||||
run: wally publish
|
||||
|
||||
- name: Pesde Login
|
||||
run: pesde auth login --token "${{ secrets.PESDE_AUTH_TOKEN }}"
|
||||
|
||||
- name: Pesde Publish
|
||||
run: pesde publish -y
|
Loading…
Add table
Add a link
Reference in a new issue