rizaldy.club/.github/workflows/ci.yaml

54 lines
1.1 KiB
YAML
Raw Normal View History

2023-07-23 07:27:41 +07:00
name: Build and Test
2021-07-18 22:54:00 +07:00
on:
2023-08-25 02:31:15 +07:00
pull_request:
branches:
- v4
2021-07-18 22:54:00 +07:00
push:
branches:
2023-08-21 04:34:00 +07:00
- v4
2021-07-18 22:54:00 +07:00
jobs:
2023-07-20 12:00:44 +07:00
build-and-test:
2023-08-07 09:52:30 +07:00
if: ${{ github.repository == 'jackyzha0/quartz' }}
2023-08-03 10:56:31 +07:00
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
2023-05-29 07:44:08 +07:00
permissions:
contents: write
2021-07-18 22:54:00 +07:00
steps:
2023-05-29 07:44:08 +07:00
- uses: actions/checkout@v3
2022-05-03 12:51:15 +07:00
with:
2023-05-29 07:44:08 +07:00
fetch-depth: 0
2021-07-18 22:54:00 +07:00
2023-05-29 07:44:08 +07:00
- name: Setup Node
uses: actions/setup-node@v3
2021-07-18 22:54:00 +07:00
with:
2023-06-08 00:52:53 +07:00
node-version: 18
2021-07-18 22:54:00 +07:00
2023-05-29 07:44:08 +07:00
- name: Cache dependencies
uses: actions/cache@v3
2021-07-18 22:54:00 +07:00
with:
2023-05-29 07:44:08 +07:00
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
2021-07-18 22:54:00 +07:00
2023-05-29 07:44:08 +07:00
- run: npm ci
2023-07-23 07:42:13 +07:00
2023-07-23 07:39:10 +07:00
- name: Check types and style
2023-07-23 07:42:13 +07:00
run: npm run check
2023-05-29 07:44:08 +07:00
2023-07-13 14:19:35 +07:00
- name: Test
run: npm test
2021-07-18 22:54:00 +07:00
2023-09-11 13:07:17 +07:00
- name: Ensure Quartz builds, check bundle info
run: npx quartz build --bundleInfo
2023-11-02 00:03:45 +07:00
- name: Create release tag
uses: Klemensas/action-autotag@stable
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
tag_prefix: "v"