File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
templates/react-native/.github/workflows Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 4
4
release:
5
5
types: [published]
6
6
workflow_dispatch:
7
-
8
7
9
8
jobs:
10
9
publish:
@@ -20,13 +19,24 @@ jobs:
20
19
node-version: '20.x'
21
20
registry-url: 'https://registry.npmjs.org'
22
21
22
+ # Determine release tag based on the tag name
23
+ - name: Determine release tag
24
+ id: release_tag
25
+ run: |
26
+ if [[ "${{ github .ref }}" == *"-rc"* ]]; then
27
+ echo "tag=next" >> "$GITHUB_OUTPUT"
28
+ else
29
+ echo "tag=latest" >> "$GITHUB_OUTPUT"
30
+ fi
31
+
32
+ # Install dependencies (if any) and build your project (if necessary)
23
33
- name: Install dependencies and build
24
34
run: |
25
35
npm install
26
36
npm run build
27
37
28
- # Publish to NPM
38
+ # Publish to NPM with the appropriate tag
29
39
- name: Publish
30
- run: npm publish
40
+ run: npm publish --tag ${{ steps . release_tag . outputs . tag }}
31
41
env:
32
- NODE_AUTH_TOKEN: ${{' {{ ' }} secrets.NPM_TOKEN{{ ' }} ' }}
42
+ NODE_AUTH_TOKEN: ${{secrets .NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments