Skip to content

Commit

Permalink
Add automatic package publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
keichinger committed Mar 21, 2024
1 parent 82c9c52 commit ea9c1b1
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on: [ push ]
on: [ push, workflow_call ]

jobs:
build-test:
Expand All @@ -19,7 +19,8 @@ jobs:
version: 'latest'
run_install: true

- run: pnpm test
- name: Run Tests
run: pnpm test

- name: Prettify package.json
run: ./node_modules/.bin/prettier-package-json --use-tabs --list-different
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release version to npm

on:
workflow_dispatch:
push:
tags:
- '*'

jobs:
ci:
uses: "./.github/workflows/ci.yml"
deploy:
name: deploy
needs: [ci]
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '18'

- uses: pnpm/action-setup@v3
with:
version: 'latest'
run_install: true

- name: Set version number in package.json
run: pnpm version from-git --no-git-tag-version

- name: Publish package
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
=====

* (bug) Revert CSS Reset back to no longer use `:where()`.
* (internal) Add automatic package publishing.


2.0.0
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@
},
"publishConfig": {
"access": "public",
"publish-branch": "1.x"
"publish-branch": "2.x"
},
"ava": {
"files": [
"tests/**/*.test.mjs"
]
},
"np": {
"branch": "1.x",
"contents": "dist"
}
}

0 comments on commit ea9c1b1

Please sign in to comment.