Skip to content

Commit 454cbee

Browse files
committed
chore: add npm publish beta workflow
1 parent 09ad600 commit 454cbee

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: Node.js Package Beta
5+
6+
on:
7+
# Trigger the workflow from any feature branch
8+
workflow_dispatch:
9+
inputs:
10+
betaVersion:
11+
description: "Version tag for the beta job"
12+
required: true
13+
type: number
14+
jobs:
15+
publish-npm-beta:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-node@v1
20+
with:
21+
node-version: 12
22+
registry-url: https://registry.npmjs.org/
23+
- name: Set Git Environment and Update package number
24+
run: |
25+
sudo apt upgrade && sudo apt install jq -y
26+
npm --no-git-tag-version version patch
27+
currentVersion=$(jq --raw-output '.version' package.json)
28+
git config --global user.name 'GIT Package Updater'
29+
git config --global user.email 'razorRun@users.noreply.github.com'
30+
npm -f version "$currentVersion-beta.${{ github.event.inputs.betaVersion }}"
31+
git push
32+
- run: npm ci
33+
- run: npm publish --tag beta
34+
env:
35+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)