Skip to content

Commit db8f8b4

Browse files
authored
chore: add npm publish workflow with nightly releases (#12)
* chore: add npm publish workflow with nightly releases * chore: add manual npm publish workflow
1 parent e0705d5 commit db8f8b4

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Publish release to npm
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
release-type:
6+
description: Type of release to publish.
7+
type: choice
8+
options:
9+
- stable
10+
- nightly
11+
- beta
12+
- rc
13+
default: stable
14+
version:
15+
description: Specific version to publish (usually inferred from x.y-stable branch name).
16+
type: string
17+
required: false
18+
default: ''
19+
dry-run:
20+
description: Whether to perform a dry run of the publish.
21+
type: boolean
22+
default: true
23+
24+
jobs:
25+
npm-build:
26+
if: github.repository == 'software-mansion-labs/react-native-streamdown'
27+
runs-on: ubuntu-latest
28+
29+
permissions:
30+
contents: write
31+
id-token: write # for OIDC
32+
33+
concurrency:
34+
group: publish-${{ github.ref }}
35+
cancel-in-progress: false
36+
37+
steps:
38+
- name: Check out
39+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
40+
41+
- name: Setup Node
42+
uses: actions/setup-node@v6
43+
with:
44+
node-version: 24
45+
cache: 'yarn'
46+
registry-url: https://registry.npmjs.org/
47+
48+
- name: Publish release
49+
uses: software-mansion-labs/npm-package-publish@main
50+
with:
51+
package-name: 'react-native-streamdown'
52+
package-json-path: 'package.json'
53+
install-dependencies-command: 'YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install'
54+
release-type: ${{ inputs.release-type }}
55+
version: ${{ inputs.version }}
56+
dry-run: ${{ inputs.dry-run }}
57+

0 commit comments

Comments
 (0)