From 5149d38ac61e03e1adeff86ad79b9a97a2775ba7 Mon Sep 17 00:00:00 2001 From: Mathieu Acthernoene Date: Fri, 10 Jan 2025 10:40:18 +0100 Subject: [PATCH] Add publish script --- .github/workflows/release.yml | 39 +++++++++++++++++++++++++++++++++++ package.json | 4 ++-- 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c337794 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + tags: + - "v*" + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 60 + + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Typecheck + run: pnpm typecheck + + - name: Run tests + run: pnpm test:ci + + - name: Build + run: pnpm build + + - name: Publish + run: | + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc + npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 7092fd6..beff593 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "@swan-io/css", - "version": "0.1.0", + "version": "0.1.1", "license": "MIT", - "description": "An atomic CSS-in-JS library inspired by React Native StyleSheet", + "description": "A lightweight and performant atomic CSS-in-JS library", "author": "Mathieu Acthernoene ", "homepage": "https://github.com/swan-io/bot-detector", "repository": {