diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..09ff2834 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -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/setup-aftman@v0.3.0 + + - 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/setup-aftman@v0.3.0 + + - 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/setup-aftman@v0.3.0 + + - 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/setup-aftman@v0.3.0 + + - 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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 2c9fa5dd..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: CI - -on: - push: - branches: - - main - - pull_request: - branches: - - main - -jobs: - lint: - name: Lint with Selene - runs-on: ubuntu-latest - - steps: - - name: Checkout Project - uses: actions/checkout@v3 - - - name: Setup Aftman - uses: ok-nick/setup-aftman@v0.3.0 - - - name: Selene - run: selene lib example/src tests - format: - name: Check StyLua - runs-on: ubuntu-latest - - steps: - - name: Checkout Project - uses: actions/checkout@v3 - - - name: Setup Aftman - uses: ok-nick/setup-aftman@v0.3.0 - - - name: StyLua - run: stylua lib example/src tests --check \ No newline at end of file diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 00000000..ef3c4832 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -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 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 96a276ce..a23ad0f8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,8 +5,8 @@ on: tags: ["v*"] jobs: - build-matter: - name: Build Matter + build: + name: Build runs-on: ubuntu-latest steps: - name: Checkout Project @@ -15,14 +15,17 @@ jobs: - name: Install Aftman uses: ok-nick/setup-aftman@v0.3.0 - - 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 @@ -34,18 +37,21 @@ jobs: - name: Install Aftman uses: ok-nick/setup-aftman@v0.3.0 + - 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 @@ -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 @@ -84,5 +90,5 @@ jobs: - name: Install Aftman uses: ok-nick/setup-aftman@v0.3.0 - - name: Publish Matter - run: wally publish --token ${{ secrets.WALLY_TOKEN }} + - name: Publish + run: wally publish --token ${{ secrets.WALLY_AUTH_TOKEN }}