-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (39 loc) · 1.18 KB
/
npm-publish-beta.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Publish NPM Beta Package
on:
pull_request_target:
types:
- closed
branches:
- master
jobs:
publish-npm-beta:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.merge_commit_sha }}
- name: Get short SHA
id: set_sha
run: echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV; echo $(git rev-parse --short HEAD)
- uses: "phips28/gh-action-bump-version@master"
with:
default: prerelease
minor-wording: "MINOR RELEASE"
major-wording: "MAJOR RELEASE"
patch-wording: "PATCH RELEASE"
rc-wording: null
preid: beta-${{ env.SHA_SHORT }}
skip-tag: "true"
skip-commit: "true"
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm test
- run: npm run build
- run: npm publish --access public --ignore-scripts --tag beta
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}