-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (48 loc) · 1.62 KB
/
publish.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
46
47
48
49
name: Blox Publish
on:
workflow_dispatch:
inputs:
version:
description: "Publish version"
required: true
default: "patch"
type: choice
options:
- patch
- minor
- major
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- name: Bumping version
run: |
git config --global user.name "Blox CI"
git config --global user.email "[email protected]"
echo "version: $VERSION"
NEW_VERSION=$(npm version $VERSION)
npm version ${NEW_VERSION:1} -w=packages/core -w=packages/scripts -w=packages/create-blox-app
git add . && git commit --amend --no-edit --no-verify -m "[skip ci] Releasing $NEW_VERSION"
git push --follow-tags origin main
env:
VERSION: ${{ inputs.version }}
ACTOR: ${{ github.triggering_actor }}
- run: npm run build -w=packages/core -w=packages/create-blox-app
- name: Publishing all packages to npm
run: npm publish --access public -w=packages/core -w=packages/scripts -w=packages/create-blox-app
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Publishing all packages to npm
# run: npm publish --access public -w=packages/core -w=packages/scripts -w=packages/create-blox-app
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - run: npm run build:docs
# copy to pages