Skip to content

Commit 400d4ef

Browse files
authored
ci: Publish npm packages (#96)
1 parent c0a5cec commit 400d4ef

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,29 @@ jobs:
5555
with:
5656
subject-checksums: ./dist/digests.txt
5757

58+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
59+
with:
60+
node-version: 24 # npm >= 11.5.1 required for OIDC trusted publishing
61+
# TODO: switch to goreleaser-npm-publisher-action once https://github.com/evg4b/goreleaser-npm-publisher/pull/26 is released
62+
# Prebuilt dist committed on the fork branch (5e09f1e + dist/, built and
63+
# smoke-tested locally). Deliberately no yarn install/build here: this job
64+
# holds id-token: write, so third-party install scripts must not run in it.
65+
- name: Fetch goreleaser-npm-publisher
66+
run: |
67+
git clone https://github.com/khvn26/goreleaser-npm-publisher "$RUNNER_TEMP/gnp"
68+
git -C "$RUNNER_TEMP/gnp" checkout ad16d393106b23b6289d0569beefb8e9b3bd3159
69+
- name: Publish npm packages
70+
run: >-
71+
node "$RUNNER_TEMP/gnp/dist/cli.cjs" publish
72+
--name cli
73+
--bin flagsmith
74+
--prefix @flagsmith
75+
--license MIT
76+
--repository 'git+https://github.com/Flagsmith/flagsmith-cli.git'
77+
--description 'The Flagsmith command-line interface'
78+
--keywords flagsmith feature-flags cli
79+
--files README.md LICENSE
80+
5881
# During public beta the newest beta is what people
5982
# should land on, so clear it.
6083
- if: contains(github.ref_name, '-beta')

0 commit comments

Comments
 (0)