Skip to content

Commit

Permalink
Merge pull request #12 from jharlow/feat-publish-workflow-1
Browse files Browse the repository at this point in the history
feat(workflows): publish pipeline
  • Loading branch information
jharlow authored Oct 11, 2024
2 parents ab3810b + e59a37a commit 76848c5
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 3 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/main-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: PR Checks
on:
push:
branches: [main]
jobs:
quality-check:
name: Node Quality Check
runs-on: ubuntu-latest
env:
PORT: 8000
strategy:
matrix:
node-version: [20.x, 19.x, 18.x]
steps:
- uses: actions/checkout@v4
- name: Setup DynamoDB local
run: docker run -d -p 8000:8000 amazon/dynamodb-local:latest
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install packages
run: pnpm install
- name: Run build command
run: pnpm build
- name: Run ESLint
run: pnpm lint
- name: Run test suite
run: pnpm test run
- name: Run 100% coverage check
run: pnpm coverage
publish:
runs-on: ubuntu-latest
needs: quality-check
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
3 changes: 0 additions & 3 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: PR Checks
on:
pull_request:
Expand Down

0 comments on commit 76848c5

Please sign in to comment.