-
-
Notifications
You must be signed in to change notification settings - Fork 148
83 lines (69 loc) · 2.51 KB
/
release-dev.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# This workflow is for the release please action. It automates releases when using conventional commit messages
# It also auto publishes releases to npm under the @develop tag
# For more information see: https://github.com/google-github-actions/release-please-action
name: release-dev
on:
push:
branches:
- dev
jobs:
release-please:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16.x]
steps:
- name: Use release please
uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
path: packages/bootstrap-vue-3
package-name: bootstrap-vue-3
bump-minor-pre-major: true
bump-patch-for-minor-pre-major: true
default-branch: dev
release-labels: 'autorelease: published'
# The logic below handles the npm publication:
- name: Clone repository
uses: actions/checkout@v3
if: ${{ steps.release.outputs.releases_created }}
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.releases_created }}
- name: Install pnpm
uses: pnpm/[email protected]
id: pnpm-install
with:
version: 7
run_install: false
if: ${{ steps.release.outputs.releases_created }}
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
if: ${{ steps.release.outputs.releases_created }}
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
if: ${{ steps.release.outputs.releases_created }}
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
if: ${{ steps.release.outputs.releases_created }}
- name: Build library
run: pnpm run build
if: ${{ steps.release.outputs.releases_created }}
- name: Publish
run: pnpm publish --tag develop --filter bootstrap-vue-3 --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.releases_created }}