-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (38 loc) · 1.07 KB
/
publish-beta.yaml
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
name: Publish beta
on:
workflow_dispatch
jobs:
publish-beta:
name: Publish to package registry
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://npm.pkg.github.com'
cache: 'npm'
- name: Bump version
run: |
git config --global user.name '${{ github.actor }}'
git config --global user.email '${{ github.actor }}@users.noreply.github.com'
npm version prerelease --preid beta
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test
- name: Build package
run: npm run build
- name: Publish package
id: publish
run: npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push new version tag
if: steps.publish.outcome == 'success'
run: git push