Skip to content

Commit

Permalink
Update automations (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
LastTalon authored Jan 8, 2024
1 parent 842a8b9 commit a3601fb
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 52 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
pull_request:
push:
branches:
- main

jobs:
format:
name: Formatting
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3

- name: Install Aftman
uses: ok-nick/[email protected]

- name: Check Formatting
run: stylua --check .

lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3

- name: Install Aftman
uses: ok-nick/[email protected]

- name: Check Linting
run: selene lib tests example/src

build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout Project
uses: actions/checkout@v3

- name: Install Aftman
uses: ok-nick/[email protected]

- name: Install Dependencies
run: wally install

- name: Build
run: rojo build --output build.rbxm default.project.json

- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: build
path: build.rbxm

build-example:
name: Build Example Game
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout Project
uses: actions/checkout@v3

- name: Install Aftman
uses: ok-nick/[email protected]

- name: Install Dependencies
run: wally install --project-path example

- name: Build
run: rojo build --output build.rbxm example.project.json

- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: build-example
path: build.rbxm
38 changes: 0 additions & 38 deletions .github/workflows/ci.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Docs

on:
pull_request:
push:
branches:
- main

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v3

- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install Moonwave
run: npm install -g moonwave

- name: Generate Docs
run: moonwave build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: build

deploy:
name: Deploy
if: github.event_name == 'push'
needs:
- build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/deploy-pages@v4
34 changes: 20 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
tags: ["v*"]

jobs:
build-matter:
name: Build Matter
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Project
Expand All @@ -15,14 +15,17 @@ jobs:
- name: Install Aftman
uses: ok-nick/[email protected]

- name: Build Matter
run: rojo build --output matter.rbxm default.project.json
- name: Install Dependencies
run: wally install

- name: Build
run: rojo build --output build.rbxm default.project.json

- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: matter
path: matter.rbxm
name: build
path: build.rbxm

build-example:
name: Build Example Game
Expand All @@ -34,18 +37,21 @@ jobs:
- name: Install Aftman
uses: ok-nick/[email protected]

- name: Install Dependencies
run: wally install --project-path example

- name: Build Example Game
run: rojo build --output example.rbxl example.project.json
run: rojo build --output build.rbxl example.project.json

- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: example
path: example.rbxl
name: build-example
path: build.rbxl

release:
name: Release
needs: [build-matter, build-example]
needs: [build, build-example]
runs-on: ubuntu-latest
steps:
- name: Checkout Project
Expand All @@ -54,13 +60,13 @@ jobs:
- name: Download Matter Build
uses: actions/download-artifact@v3
with:
name: matter
name: build
path: matter.rbxm

- name: Download Example Game Build
uses: actions/download-artifact@v3
with:
name: example
name: build-example
path: AttackOfTheKillerRoombas.rbxl

- name: Create Release
Expand All @@ -84,5 +90,5 @@ jobs:
- name: Install Aftman
uses: ok-nick/[email protected]

- name: Publish Matter
run: wally publish --token ${{ secrets.WALLY_TOKEN }}
- name: Publish
run: wally publish --token ${{ secrets.WALLY_AUTH_TOKEN }}

0 comments on commit a3601fb

Please sign in to comment.