Skip to content

Commit ca4e11f

Browse files
committed
add publish workflow
1 parent aa3d36d commit ca4e11f

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

.github/workflows/publish.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish Package to npmjs
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: "The version to publish"
7+
required: true
8+
tag:
9+
description: "Tag"
10+
required: true
11+
default: "latest"
12+
type: choice
13+
options:
14+
- latest
15+
- snapshot
16+
- next
17+
jobs:
18+
publish:
19+
runs-on: ubuntu-latest
20+
permissions:
21+
id-token: write
22+
contents: read
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: "20.x"
28+
registry-url: "https://registry.npmjs.org"
29+
- run: npm pkg set "version=${{ inputs.version }}"
30+
- run: npm publish --provenance --tag ${{ inputs.tag }} --access public
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "remark-typescript-tools",
33
"author": "Lenz Weber-Tronic",
4-
"version": "1.1.0",
4+
"version": "2.0.0-alpha.0",
55
"license": "MIT",
66
"type": "module",
77
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)