From d04d3e18c8155f51ab45079704eff8e17281eaa1 Mon Sep 17 00:00:00 2001 From: Zoe Date: Thu, 21 Mar 2024 17:38:43 -0500 Subject: [PATCH] add github --- .github/workflows/check.yml | 18 ++++++++++++++++++ .github/workflows/publish.yml | 20 ++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/check.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..fb26b9b --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,18 @@ +name: Pull Request Checks + +on: + pull_request: + branches: + - main + +jobs: + lint-and-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '20' + - run: npm install + - run: npm run lint + - run: npm run build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..cdd27c9 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,20 @@ +name: Publish + +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org/' + - run: npm i + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}