Skip to content

Commit cd4491f

Browse files
author
Yohay Nahmany
committed
chore: adding publish flow
1 parent 36f104d commit cd4491f

4 files changed

Lines changed: 63 additions & 18 deletions

File tree

.github/workflows/publish.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Publish NPM Package
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
channel:
7+
required: true
8+
type: choice
9+
description: NPM tag to publish the package to
10+
options:
11+
- oldversion
12+
- alpha
13+
- beta
14+
- latest
15+
16+
package:
17+
required: true
18+
type: choice
19+
description: Package to publish
20+
options:
21+
- '@currents/nx'
22+
23+
permissions:
24+
id-token: write # Required for OIDC
25+
contents: read
26+
27+
jobs:
28+
publish:
29+
runs-on: ubuntu-latest
30+
defaults:
31+
run:
32+
working-directory: .
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
with:
37+
ref: ${{ github.event.pull_request.head.sha }}
38+
39+
- uses: actions/setup-node@v4
40+
with:
41+
node-version: '24.x'
42+
registry-url: 'https://registry.npmjs.org'
43+
44+
- run: npm ci
45+
- name: Publish to NPM
46+
run: |
47+
git config user.name "Currents NPM Bot"
48+
git config user.email "npm@currents.dev"
49+
npm run publish:npm --workspace ${{ github.event.inputs.package }} -- --tag ${{ github.event.inputs.channel }}

LICENSE

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
1-
MIT License
1+
Copyright 2024 Currents Software Inc
22

3-
Copyright (c) 2021 Currents Software Inc
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
116

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
148

15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.

packages/nx/LICENSE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Copyright 2024 Currents Software Inc
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8+

packages/nx/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"compile": "tsc -d",
2626
"dev": "tsc -d --watch",
2727
"release": "release-it",
28-
"clean": "rimraf dist"
28+
"clean": "rimraf dist",
29+
"publish:npm": "npm run rm && npm run build && ./publish.js"
2930
},
3031
"main": "./index.js",
3132
"typings": "./index.d.ts",

0 commit comments

Comments
 (0)