Skip to content

Commit 3b4d3d7

Browse files
committed
github nightly package release workflow
1 parent d80472d commit 3b4d3d7

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/nightly.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: publish nightly
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
publish-nightly:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
packages: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: latest
19+
registry-url: https://npm.pkg.github.com/
20+
scope: "@codebam"
21+
- run: npm ci
22+
- name: Update version
23+
run: |
24+
VERSION=$(node -p "require('./package.json').version")
25+
SHA=$(git rev-parse --short HEAD)
26+
NIGHTLY_VERSION="${VERSION}-nightly.${SHA}"
27+
echo "Publishing version $NIGHTLY_VERSION"
28+
npm version $NIGHTLY_VERSION --no-git-tag-version
29+
- run: npm run build
30+
- run: npm publish
31+
env:
32+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)