Skip to content

Prepare for release 1.0.1 (#151) #8

Prepare for release 1.0.1 (#151)

Prepare for release 1.0.1 (#151) #8

name: Publish main @autometrics/autometrics and/or the exporters to NPM
on:
push:
tags:
- "lib-*"
jobs:
test-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
scope: "@autometrics"
# Setup Bun for runtime tests
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- uses: taiki-e/install-action@v2
with:
tool: biome,just
- name: Install dependencies
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn
- name: Create packages
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false just build-npm ${GITHUB_REF}
- name: Build examples
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false just build-examples
- name: Perform type-checking
run: just type-check-all
- name: Run tests
run: just test && just test-examples
- name: Publish
run: just release-lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}