-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (25 loc) · 833 Bytes
/
Copy pathpublish_dev.yml
File metadata and controls
27 lines (25 loc) · 833 Bytes
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
name: Publish beta version of Package to npmjs
on:
workflow_dispatch:
jobs:
build_and_publish_beta:
if: github.ref_name != 'master' # Ensure it does not run on default branches
runs-on: ubuntu-latest
permissions:
id-token: write
environment: npm_beta
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: |
BRANCH_SLUG=$(echo "${{ github.ref_name }}" | sed 's|/|-|g')
SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)
npm version 0.0.0-${BRANCH_SLUG}-${SHORT_SHA} --no-git-tag-version
npm ci
npm run compile
npm publish --tag beta --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}