-
-
Notifications
You must be signed in to change notification settings - Fork 89
44 lines (35 loc) · 1.09 KB
/
release.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
name: Release
on: workflow_dispatch
jobs:
release-bundle:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
outputs:
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
new_release_version: ${{ steps.semantic.outputs.new_release_version }}
steps:
- uses: actions/checkout@v4
- name: Cache pnpm modules
id: cache-modules
uses: actions/cache@v4
with:
path: |
~/.pnpm-store
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'rollup.config.js') }}
restore-keys: |
${{ runner.os }}-
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
run_install: false
- name: Install Packages
if: steps.cache-modules.outputs.cache-hit != 'true'
run: pnpm install
- name: Build
run: pnpm build
- name: Release
run: pnpx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}