-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 887 Bytes
/
tag.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
name: Tag
env:
NPM_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
node-version: 20.x
on:
workflow_dispatch:
push:
tags:
- 'v**'
jobs:
build:
uses: micro-lc/compose-toolkit/.github/workflows/build.yml@main
release-package:
name: Release package on npm
runs-on: ubuntu-latest
needs:
- build
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
cache: yarn
- name: Build Cache
uses: actions/cache@v4
with:
path: |
./dist
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Install dependencies
run: yarn install --immutable
- name: Publish
run: yarn npm publish