Skip to content

Commit

Permalink
Merge pull request #4 from kabisa/task/expand-publish-workflow
Browse files Browse the repository at this point in the history
Update publish workflow to allow manual publishing without release
  • Loading branch information
sandercamp authored Jan 19, 2024
2 parents eebfbfb + 36cb224 commit 02d3463
Show file tree
Hide file tree
Showing 13 changed files with 166 additions and 9 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,33 @@
name: Publish package to npmjs

on:
push:
workflow_dispatch:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
env:
CI_COMMIT_AUTHOR: Continuous Integration
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
# node-version 20.6 breaks the build, babel needs to catch up.
# https://github.com/angular/angular-cli/issues/25782
node-version: "20.5"
registry-url: https://registry.npmjs.org/

# Update the package version
- if: ${{ github.event_name == 'push' }}
name: Bump version
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "[email protected]"
npm version prepatch
git push
git push --tags
- name: Publish to NPMJS
run: npm publish --access public
env:
Expand Down
75 changes: 75 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .yarn/install-state.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"name": "@kabisa/ui-components",
"author": "Sander Camp",
"license": "MIT",
"version": "0.1.0",
"version": "0.1.9-0",
"packageManager": "[email protected]",
"main": "./lib/index.js",
"exports": {
".": "./lib/index.js",
"./index.css": "./lib/index.css",
"./src/": "./src/"
},
"files": [
Expand All @@ -25,6 +26,7 @@
"@storybook/testing-library": "^0.2.0",
"@szhsin/react-menu": "^4.0.3",
"classnames": "^2.3.2",
"postcss-url": "^10.1.3",
"react-movable": "^3.0.4",
"storybook": "^7.3.2"
},
Expand All @@ -42,6 +44,7 @@
"@types/babel__preset-env": "^7",
"@types/css-modules": "^1.0.2",
"@types/eslint": "^8",
"@types/postcss-url": "^10",
"@types/prettier": "^3",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
Expand Down
8 changes: 7 additions & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import babel from "@rollup/plugin-babel";
import resolve from "@rollup/plugin-node-resolve";
import postcss from "rollup-plugin-postcss";
import postcssUrl from "postcss-url"
import typescript from '@rollup/plugin-typescript';
import postcssImport from 'postcss-import';
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
Expand All @@ -21,9 +22,14 @@ export default {
}),
typescript({ tsconfig: './tsconfig.json' }),
postcss({
extract: true,
plugins: [

// Inlines @import statements
postcssImport()
postcssImport(),
postcssUrl({
url: "inline", // enable inline assets using base64 encoding
}),
]
}),
babel({
Expand Down
64 changes: 62 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,7 @@ __metadata:
"@types/babel__preset-env": "npm:^7"
"@types/css-modules": "npm:^1.0.2"
"@types/eslint": "npm:^8"
"@types/postcss-url": "npm:^10"
"@types/prettier": "npm:^3"
"@types/react": "npm:^18.2.21"
"@types/react-dom": "npm:^18.2.7"
Expand All @@ -2027,6 +2028,7 @@ __metadata:
eslint-plugin-react: "npm:^7.33.2"
postcss: "npm:^8.4.28"
postcss-import: "npm:^15.1.0"
postcss-url: "npm:^10.1.3"
prettier: "npm:^3.0.3"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
Expand Down Expand Up @@ -4366,6 +4368,16 @@ __metadata:
languageName: node
linkType: hard

"@types/postcss-url@npm:^10":
version: 10.0.3
resolution: "@types/postcss-url@npm:10.0.3"
dependencies:
"@types/node": "npm:*"
postcss: "npm:^8.0.0"
checksum: b90ca40bbed7dd19e8e86bea34860aa2aef9210fa451ba3e044996477173c5025b49ccda896972681bbd095c9571487289fe56a0a794c437fa6f72f654c4c814
languageName: node
linkType: hard

"@types/prettier@npm:^3":
version: 3.0.0
resolution: "@types/prettier@npm:3.0.0"
Expand Down Expand Up @@ -6236,6 +6248,13 @@ __metadata:
languageName: node
linkType: hard

"cuint@npm:^0.2.2":
version: 0.2.2
resolution: "cuint@npm:0.2.2"
checksum: c1b98971f4a1b32ce71ec82eac87df87b54ee85d982e3967a6dd89f19ffd3ebbbdb82e3738e489f475611b6ed126c0deba05ed9ecffea0a721a4d43773ce0670
languageName: node
linkType: hard

"debug@npm:2.6.9, debug@npm:^2.6.9":
version: 2.6.9
resolution: "debug@npm:2.6.9"
Expand Down Expand Up @@ -9523,7 +9542,7 @@ __metadata:
languageName: node
linkType: hard

"make-dir@npm:^3.0.2":
"make-dir@npm:^3.0.2, make-dir@npm:~3.1.0":
version: 3.1.0
resolution: "make-dir@npm:3.1.0"
dependencies:
Expand Down Expand Up @@ -9705,6 +9724,15 @@ __metadata:
languageName: node
linkType: hard

"mime@npm:~2.5.2":
version: 2.5.2
resolution: "mime@npm:2.5.2"
bin:
mime: cli.js
checksum: 904b4b5927451a9f0a4f4d838a9fb5ab658dec0caef0f750ec73c41df2eb4a7c34e35dd2e2378e04c129e18b779c1205278cb6d1f94b5728adfd91de51808138
languageName: node
linkType: hard

"mimic-fn@npm:^2.1.0":
version: 2.1.0
resolution: "mimic-fn@npm:2.1.0"
Expand Down Expand Up @@ -9753,6 +9781,15 @@ __metadata:
languageName: node
linkType: hard

"minimatch@npm:~3.0.4":
version: 3.0.8
resolution: "minimatch@npm:3.0.8"
dependencies:
brace-expansion: "npm:^1.1.7"
checksum: 6df5373cb1ea79020beb6887ff5576c58cfabcfd32c5a65c2cf58f326e4ee8eae84f129e5fa50b8a4347fa1d1e583f931285c9fb3040d984bdfb5109ef6607ec
languageName: node
linkType: hard

"minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6":
version: 1.2.8
resolution: "minimist@npm:1.2.8"
Expand Down Expand Up @@ -11053,14 +11090,28 @@ __metadata:
languageName: node
linkType: hard

"postcss-url@npm:^10.1.3":
version: 10.1.3
resolution: "postcss-url@npm:10.1.3"
dependencies:
make-dir: "npm:~3.1.0"
mime: "npm:~2.5.2"
minimatch: "npm:~3.0.4"
xxhashjs: "npm:~0.2.2"
peerDependencies:
postcss: ^8.0.0
checksum: 7cfd287a9f754099191fc78b68153b35b9cdb6e9db3f06234543c0545656eb11ba61a7c6f4f02cd6de3d82d9dfec47ff1f5cd2879b030b821b580822054b8387
languageName: node
linkType: hard

"postcss-value-parser@npm:^4.0.0, postcss-value-parser@npm:^4.1.0, postcss-value-parser@npm:^4.2.0":
version: 4.2.0
resolution: "postcss-value-parser@npm:4.2.0"
checksum: e4e4486f33b3163a606a6ed94f9c196ab49a37a7a7163abfcd469e5f113210120d70b8dd5e33d64636f41ad52316a3725655421eb9a1094f1bcab1db2f555c62
languageName: node
linkType: hard

"postcss@npm:^8.4.21, postcss@npm:^8.4.28":
"postcss@npm:^8.0.0, postcss@npm:^8.4.21, postcss@npm:^8.4.28":
version: 8.4.31
resolution: "postcss@npm:8.4.31"
dependencies:
Expand Down Expand Up @@ -13673,6 +13724,15 @@ __metadata:
languageName: node
linkType: hard

"xxhashjs@npm:~0.2.2":
version: 0.2.2
resolution: "xxhashjs@npm:0.2.2"
dependencies:
cuint: "npm:^0.2.2"
checksum: 974dba1b7dd10f550714456366135fc70ba809e6e4db26e18a760a1f57e18dbc7fa6732738abc3f8fee27bb6a28d185240356ff4a57d7ce54282049e1da99886
languageName: node
linkType: hard

"y18n@npm:^5.0.5":
version: 5.0.8
resolution: "y18n@npm:5.0.8"
Expand Down

0 comments on commit 02d3463

Please sign in to comment.