From 6b4c7f5a1cb5a181a7755de1ac51e0fed2b2820f Mon Sep 17 00:00:00 2001 From: Demo <76854027+RobloxianDemo@users.noreply.github.com> Date: Tue, 5 Dec 2023 14:25:55 -0500 Subject: [PATCH] Enhancement: Update GitHub Actions. --- .github/workflows/build.yml | 18 +++++++++--------- .github/workflows/docs.yml | 16 ++++++++++------ .github/workflows/lint-external-prs.yml | 2 +- .github/workflows/lint.yml | 22 ++++++++++++---------- 4 files changed, 32 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0aec61cece8..238e11f18e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,20 +7,20 @@ jobs: release: needs: lint runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" + if: github.event_name == 'push' && !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci') && startsWith(github.ref, 'refs/tags/') steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout the Repository + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 - - name: Setup node - uses: actions/setup-node@v2 + - name: Set Up Node.JS + uses: actions/setup-node@v4.0.0 env: NPM_TOKEN: '' # https://github.com/JS-DevTools/npm-publish/issues/15 with: cache-dependency-path: package.json # we don't have a package-lock.json so we'll use this instead... - node-version: "18" + node-version: 20 - name: Run `npm install --no-package-lock` on cli-output-helpers run: npm install --no-package-lock @@ -46,7 +46,7 @@ jobs: run: npm run build working-directory: tools/nevermore-cli - - name: Run npm install + - name: Run NPM Install run: npm install --no-save - name: Create Release @@ -55,9 +55,9 @@ jobs: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: npx auto shipit - - name: Upload lerna logs + - name: Upload Lerna Logs if: failure() uses: actions/upload-artifact@v3 with: name: lerna-debug.log - path: lerna-debug.log \ No newline at end of file + path: lerna-debug.log diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8128ba9f3c5..8e9100f377e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,17 +2,21 @@ name: publish-docs on: push: branches: - - main + - main workflow_dispatch: jobs: build: - name: Build and deploy docs + name: Build and Deploy the Documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - name: Checkout the Repository + uses: actions/checkout@v4.1.1 with: - node-version: "18" + fetch-depth: 0 + - name: Set Up Node.JS + uses: actions/setup-node@v4.0.0 + with: + node-version: 20 - run: npm i -g moonwave@latest - name: Publish run: | @@ -21,4 +25,4 @@ jobs: git config --global user.name "github-actions-bot" moonwave build --publish env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint-external-prs.yml b/.github/workflows/lint-external-prs.yml index 84e1ed6a4c6..f339893e2f8 100644 --- a/.github/workflows/lint-external-prs.yml +++ b/.github/workflows/lint-external-prs.yml @@ -4,5 +4,5 @@ name: lint-external-prs on: [pull_request_target] jobs: lint: - if: "github.event.pull_request.head.repo.fork" + if: github.event.pull_request.head.repo.fork == true uses: ./.github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f6520be56c8..18889d063f6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,26 +1,28 @@ # Reusable workflow that lints the repository! name: lint -on: - workflow_call +on: workflow_call jobs: lint: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout the Repository + uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 - - name: Setup Aftman - uses: ok-nick/setup-aftman@v0.3.0 + - name: Setting up Aftman + uses: ok-nick/setup-aftman@v0.4.2 with: - version: "v0.2.7" + version: 'v0.2.7' + cache: 'true' token: ${{ secrets.GITHUB_TOKEN }} - - name: Generate standard library + - name: Generate the Standard Library run: selene generate-roblox-std - - name: Run Selene + - name: Source Checking With Selene run: selene src - name: Run moonwave-extractor if: success() || failure() - run: moonwave-extractor extract src \ No newline at end of file + run: moonwave-extractor extract src