From d69b9f76fea72add5532f7494015682b03e3efc2 Mon Sep 17 00:00:00 2001 From: Charlie <30303272+charliefoxtwo@users.noreply.github.com> Date: Sat, 30 Sep 2023 19:57:35 -0700 Subject: [PATCH] Update CI workflows (#3) --- .github/workflows/build.yml | 18 +++++++-------- .github/workflows/release.yml | 18 +++++++-------- .github/workflows/validate.yml | 41 ++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/validate.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 452eb6d..590f49a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,35 +5,35 @@ jobs: build_on_linux: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@master + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 18 - name: install dependencies - run: npm install + run: npm ci - name: build run: npm run make build_on_mac: runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@master + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 18 - name: install dependencies - run: npm install + run: npm ci - name: build run: npm run make build_on_win: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@master + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 18 - name: install dependencies - run: npm install + run: npm ci - name: build run: npm run make diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e43f73..78bbf59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,12 +8,12 @@ jobs: publish_on_linux: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@master + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 18 - name: install dependencies - run: npm install + run: npm ci - name: publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -22,12 +22,12 @@ jobs: publish_on_mac: runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@master + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 18 - name: install dependencies - run: npm install + run: npm ci - name: publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -36,12 +36,12 @@ jobs: publish_on_win: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@master + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 18 - name: install dependencies - run: npm install + run: npm ci - name: publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..c5ad717 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,41 @@ +name: Validate + +on: [push, pull_request] + +jobs: + eslint: + runs-on: ubuntu-latest + + name: eslint + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install dependencies + run: npm ci # install dependencies + + - name: Run eslint + run: npm run lint # run eslint + prettier: + runs-on: ubuntu-latest + + name: prettier + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install dependencies + run: npm ci # install dependencies + + - name: Run prettier + run: npm run prettier # run prettier