Skip to content

Commit

Permalink
Merge pull request #28 from 21TORR/automatic-publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
keichinger authored Mar 21, 2024
2 parents 82c9c52 + 41f805c commit cd55660
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 11 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
14 changes: 5 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,18 @@
"test": "ava -v"
},
"devDependencies": {
"@types/node": "^18.19.3",
"ava": "^6.0.1",
"prettier-package-json": "^2.6.0",
"sass": "^1.69.5"
"@types/node": "^18.19.26",
"ava": "^6.1.2",
"prettier-package-json": "^2.8.0",
"sass": "^1.72.0"
},
"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 cd55660

Please sign in to comment.