Skip to content

Commit da0c84e

Browse files
authored
ci: automate npm publish with Release Please and OIDC trusted publishers (#38)
* ci: automate npm publish with Release Please and OIDC trusted publishers - Add publish job to release-please.yml using GitHub OIDC (tokenless npm auth) - Job runs on ubuntu-latest (required for OIDC) with id-token:write permission - Triggers only when apps/work-please release is created (path-scoped output) - Update apps/work-please/package.json: remove private, add license/repository/files/description - Remove private flag from apps/work-please in release-please-config.json - Update LICENSE from FSL-1.1-ALv2 to FSL-1.1-MIT (Passion Factory, Inc, change date 2028-03-13) * fix(ci): apply review suggestions for LICENSE inclusion and OIDC condition * fix(ci): copy LICENSE and README.md in workflow instead of prepublishOnly * fix(ci): add prepublishOnly/postpublish scripts for local publish support * chore: gitignore publish artifacts copied into apps/work-please
1 parent cf349a6 commit da0c84e

6 files changed

Lines changed: 75 additions & 24 deletions

File tree

‎.github/workflows/release-please.yml‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
outputs:
1616
release_created: ${{ steps.release.outputs.release_created }}
1717
tag_name: ${{ steps.release.outputs.tag_name }}
18+
app_release_created: ${{ steps.release.outputs['apps/work-please--release_created'] }}
1819
steps:
1920
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
2021
id: app-token
@@ -29,3 +30,32 @@ jobs:
2930
release-type: node
3031
config-file: release-please-config.json
3132
manifest-file: .release-please-manifest.json
33+
34+
publish:
35+
needs: release-please
36+
if: ${{ needs.release-please.outputs.app_release_created == 'true' }}
37+
runs-on: ubuntu-latest
38+
permissions:
39+
id-token: write
40+
contents: read
41+
steps:
42+
- uses: actions/checkout@v4
43+
44+
- uses: actions/setup-node@v4
45+
with:
46+
node-version-file: .nvmrc
47+
registry-url: 'https://registry.npmjs.org'
48+
49+
- uses: oven-sh/setup-bun@v2
50+
with:
51+
bun-version-file: package.json
52+
53+
- run: bun install --frozen-lockfile
54+
55+
- run: bun run build
56+
57+
- name: Copy root files into package directory
58+
run: cp LICENSE README.md apps/work-please/
59+
60+
- run: npm publish --provenance --access public
61+
working-directory: apps/work-please

‎.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ dist/
77

88
# please plugin runtime state
99
.please/state/
10+
11+
# npm publish artifacts copied from root (prepublishOnly/postpublish)
12+
apps/work-please/LICENSE
13+
apps/work-please/README.md

‎LICENSE‎

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
Functional Source License, Version 1.1, ALv2 Future License
1+
Functional Source License, Version 1.1, MIT Future License
22

3-
Copyright 2026 Passion Factory Inc
3+
Copyright 2026 Passion Factory, Inc
44

55
## Abbreviation
66

7-
FSL-1.1-ALv2
7+
FSL-1.1-MIT
88

99
## Notice
1010

11-
Copyright 2026 Passion Factory Inc
11+
Copyright 2026 Passion Factory, Inc
1212

1313
## Terms and Conditions
1414

@@ -89,19 +89,24 @@ trademarks, trade names, service marks or product names.
8989
## Grant of Future License
9090

9191
We hereby irrevocably grant you an additional license to use the Software under
92-
the Apache License, Version 2.0 that is effective on the second anniversary of
93-
the date we make the Software available. On or after that date, you may use the
94-
Software under the Apache License, Version 2.0, in which case the following
95-
will apply:
96-
97-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
98-
this file except in compliance with the License.
99-
100-
You may obtain a copy of the License at
101-
102-
http://www.apache.org/licenses/LICENSE-2.0
103-
104-
Unless required by applicable law or agreed to in writing, software distributed
105-
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
106-
CONDITIONS OF ANY KIND, either express or implied. See the License for the
107-
specific language governing permissions and limitations under the License.
92+
the MIT License that is effective on 2028-03-13. On or after that date, you
93+
may use the Software under the MIT License, in which case the following will
94+
apply:
95+
96+
Permission is hereby granted, free of charge, to any person obtaining a copy
97+
of this software and associated documentation files (the "Software"), to deal
98+
in the Software without restriction, including without limitation the rights
99+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
100+
copies of the Software, and to permit persons to whom the Software is
101+
furnished to do so, subject to the following conditions:
102+
103+
The above copyright notice and this permission notice shall be included in all
104+
copies or substantial portions of the Software.
105+
106+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
107+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
108+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
109+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
110+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
111+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
112+
SOFTWARE.

‎apps/work-please/package.json‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,24 @@
22
"name": "@pleaseai/work",
33
"type": "module",
44
"version": "0.0.0",
5-
"private": true,
5+
"description": "Symphony-spec orchestrator for Claude Code + Asana/GitHub Projects v2",
6+
"license": "FSL-1.1-MIT",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/chatbot-pf/work-please.git",
10+
"directory": "apps/work-please"
11+
},
612
"bin": {
713
"work-please": "./dist/index.js"
814
},
15+
"files": [
16+
"LICENSE",
17+
"README.md",
18+
"dist"
19+
],
920
"scripts": {
21+
"prepublishOnly": "cp ../../LICENSE ../../README.md .",
22+
"postpublish": "rm -f LICENSE README.md",
1023
"build": "bun build ./src/index.ts --outdir ./dist --target bun",
1124
"dev": "bun run --watch src/index.ts",
1225
"lint": "eslint .",

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "work-please",
2+
"name": "workplease",
33
"private": true,
44
"version": "0.0.0",
55
"workspaces": [

‎release-please-config.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
"apps/work-please": {
1313
"release-type": "node",
1414
"package-name": "@pleaseai/work",
15-
"changelog-path": "CHANGELOG.md",
16-
"private": true
15+
"changelog-path": "CHANGELOG.md"
1716
}
1817
}
1918
}

0 commit comments

Comments
 (0)