forked from bootstrap-vue-next/bootstrap-vue-next
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (68 loc) · 2.76 KB
/
release-main.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
84
# 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 @latest tag on merge
# For more information see: https://github.com/google-github-actions/release-please-action
name: release-main
on:
push:
branches:
- main
jobs:
release-please:
permissions:
contents: write
pull-requests: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Use Release Please
uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
monorepo-tags: true
# The logic below handles the npm publication:
- name: Clone Repository
uses: actions/checkout@v4
if: ${{ steps.release.outputs.releases_created }}
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 22.x.x
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.releases_created }}
- name: Install PNPM
uses: pnpm/action-setup@v4
id: pnpm-install
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 --filter bootstrap-vue-next --filter @bootstrap-vue-next/nuxt
if: ${{ steps.release.outputs.releases_created }}
- name: Publish Main
run: pnpm publish --tag latest --filter bootstrap-vue-next --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true
if: ${{ steps.release.outputs.releases_created && steps.release.outputs['packages/bootstrap-vue-next--release_created'] }}
- name: Publish Nuxt
run: pnpm publish --tag latest --filter @bootstrap-vue-next/nuxt --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN_NUXT_PACKAGE}}
NPM_CONFIG_PROVENANCE: true
if: ${{ steps.release.outputs.releases_created && steps.release.outputs['packages/nuxt--release_created'] }}