diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0c23d42 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release + +on: + workflow_dispatch: + release: + types: + - published + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: ".nvmrc" + - run: npm set '//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}' + - run: npm ci + - run: npm run build + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml new file mode 100644 index 0000000..6759922 --- /dev/null +++ b/.github/workflows/verify.yml @@ -0,0 +1,44 @@ +name: Verify 👮🏽‍♂️ + +on: + workflow_dispatch: + workflow_call: + pull_request: + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + codestyle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: ".nvmrc" + - run: npm ci + - run: npm run codestyle-check + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: ".nvmrc" + - run: npm ci + - run: npm run lint + + types: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: ".nvmrc" + - run: npm ci + - run: npm run typecheck diff --git a/CHANGELOG.md b/CHANGELOG.md index 47bc1b8..30f7e3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.0.0-alpha.0] +## [1.0.0-canary.0] ### Initial release diff --git a/package-lock.json b/package-lock.json index 1bdabaf..d88f7d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@boonya/react-toaster", - "version": "1.0.0-alpha.0", + "version": "1.0.0-canary.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@boonya/react-toaster", - "version": "1.0.0-alpha.0", + "version": "1.0.0-canary.0", "license": "MIT", "workspaces": [ "eslint", diff --git a/package.json b/package.json index 70ebcb4..e928299 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@boonya/react-toaster", - "version": "1.0.0-alpha.0", + "version": "1.0.0-canary.0", "description": "Simple and lightweight react library to show stackable toasts.", "keywords": [ "notification", @@ -30,6 +30,8 @@ "verify": "npm run code-style && npm run lint", "types": "tsc -p tsconfig.json --noEmit", "build": "tsup", + "prepack": "jq 'del(.engines, .workspaces, .scripts, .devDependencies)' package.json > clean-package.json && mv clean-package.json package.json", + "postpack": "git checkout package.json", "storybook:build": "npm run build -w storybook" }, "dependencies": {