From 7bd3cc4270e9731c96ca8607ae392bf403d20129 Mon Sep 17 00:00:00 2001 From: Tilly Woodfield <22456167+tillywoodfield@users.noreply.github.com> Date: Tue, 14 May 2024 16:28:15 +0300 Subject: [PATCH] ci: Add publish workflow --- .github/workflows/publish.yml | 27 +++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..36aa632 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Publish + +on: + push: + tags: + - "*" + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "20.x" + - name: Install dependencies + run: npm ci + - name: Lint + run: npm run lint + - name: Build project + run: npm run build + - name: Build storybook + run: npm run build:storybook + - name: Publish to NPM + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} diff --git a/package-lock.json b/package-lock.json index c382875..4b5167b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iati-design-system", - "version": "0.1.3", + "version": "0.1.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iati-design-system", - "version": "0.1.3", + "version": "0.1.4", "dependencies": { "normalize-scss": "^8.0.0" }, diff --git a/package.json b/package.json index 58d1042..9548b52 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "iati-design-system", "description": "A design system for IATI products.", - "version": "0.1.3", + "version": "0.1.4", "repository": { "type": "git", "url": "git+https://github.com/IATI/design-system.git"