diff --git a/.github/workflows/Bun.js CI.yml b/.github/workflows/Bun.js CI.yml new file mode 100644 index 0000000..4c537a4 --- /dev/null +++ b/.github/workflows/Bun.js CI.yml @@ -0,0 +1,29 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Bun.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + bun-version: [1.3.x] + + steps: + - uses: actions/checkout@v4 + - name: Use Bun.js ${{ matrix.bun-version }} + uses: oven-sh/setup-bun@v2 + with: + bun-version: ${{ matrix.bun-version }} + - run: bun ci + - run: bun tests + - run: bun lint diff --git a/.github/workflows/NPM publish.yml b/.github/workflows/NPM publish.yml new file mode 100644 index 0000000..d207703 --- /dev/null +++ b/.github/workflows/NPM publish.yml @@ -0,0 +1,34 @@ +# This workflow will run tests using node and then publish a package to NPM when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: npm ci + - run: npm run tests + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm run build + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.BITWISE_FLAG_PUBLISH_TOKEN}}