Skip to content

chore(release): v1.0.0 #156

chore(release): v1.0.0

chore(release): v1.0.0 #156

Workflow file for this run

name: ci.yml
env:
CI: true
NODE_VERSION: 18
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: write # for dependabot updates
jobs:
unit-tests:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: npm install
# run: bun install --frozen-lockfile
- run: ls -la && ls src/lib -la
- name: Run unit tests
run: bun run test
publish-to-npm-public:
runs-on: ubuntu-latest
timeout-minutes: 5
needs: unit-tests
# Avoid running for non-main branches and non-merge events like new pull requests.
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm install
# - run: bun install --frozen-lockfile
- run: ls -la && ls src/lib -la
- name: Publish to NPM, if version was incremented
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
ignore-scripts: false # Allows the project's `prepublishOnly` script.
strategy: upgrade # Publish only if the version was incremented.