Skip to content

Commit fa34dc0

Browse files
committed
feat: suffix-internal-version-in-action
1 parent ee8143a commit fa34dc0

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish Internal NPM Package
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
id-token: write
8+
contents: read
9+
10+
jobs:
11+
package:
12+
runs-on: ubuntu-latest
13+
name: Publish Internal NPM Package
14+
15+
steps:
16+
- name: Cloning repo
17+
uses: actions/checkout@v5
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version-file: .nvmrc
22+
registry-url: 'https://registry.npmjs.org'
23+
24+
- run: npm i
25+
26+
- name: Set internal version
27+
run: |
28+
VERSION=$(node -p "require('./lib/flagsmith/package.json').version")
29+
INTERNAL="${VERSION}-internal.${{ github.run_number }}"
30+
echo "Publishing version: $INTERNAL"
31+
cd lib/flagsmith && npm version $INTERNAL --no-git-tag-version
32+
cd ../../lib/react-native-flagsmith && npm version $INTERNAL --no-git-tag-version
33+
34+
- name: Build and test
35+
run: npm run build && npm test
36+
37+
- name: Publish
38+
run: |
39+
cd lib/flagsmith && npm publish --tag internal --access public
40+
cd ../../lib/react-native-flagsmith && npm publish --tag internal --access public

0 commit comments

Comments
 (0)