-
-
Notifications
You must be signed in to change notification settings - Fork 18
49 lines (46 loc) · 1.58 KB
/
release-please.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
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Run release-please
uses: google-github-actions/release-please-action@v4
id: release
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.GITHUB_TOKEN }}
# this is a built-in strategy in release-please, see "Action Inputs"
# for more options
release-type: node
# The logic below handles the npm publication:
- name: Checkout Git repository
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4
- uses: actions/setup-node@v4
if: ${{ steps.release.outputs.release_created }}
with:
node-version: "20"
cache: "yarn"
- name: Setup Bun
if: ${{ steps.release.outputs.release_created }}
uses: oven-sh/setup-bun@v1
- name: Install dependencies with Yarn
if: ${{ steps.release.outputs.release_created }}
run: yarn install --immutable
- name: Publish to npm
run: yarn just publish
if: ${{ steps.release.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}