Skip to content

feat: modernize CI infra #1

feat: modernize CI infra

feat: modernize CI infra #1

Workflow file for this run

name: Node build, test and publish
on:
pull_request:
types: [assigned, opened, synchronize, reopened]
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- name: npm install, lint, build, and test
run: |
yarn install --immutable
yarn build
yarn lint
yarn test
env:
CI: true
publish-npm:
needs: build
if: github.ref == 'refs/heads/main'
permissions:
contents: write
issues: write
id-token: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- run: yarn install --immutable
- run: yarn build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.SESAMECARE_OSS_NPM_TOKEN }}
run: |
yarn dlx semantic-release