-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (49 loc) · 1.76 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
50
51
52
53
54
name: Release Please
on:
push:
branches:
- main
# Documentation:
# https://github.com/googleapis/release-please
# https://github.com/googleapis/release-please-action
# https://github.com/googleapis/release-please/blob/main/docs/customizing.md
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
- name: Release Info
run: echo "$RELEASE_OUTPUT"
env:
RELEASE_OUTPUT: ${{ toJSON(steps.release.outputs) }}
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
if: ${{ steps.release.outputs.release_created }}
with:
node-version-file: .nvmrc
cache: yarn
registry-url: 'https://registry.npmjs.org'
scope: sbb-esta
- run: yarn install --frozen-lockfile --non-interactive
if: ${{ steps.release.outputs.release_created }}
- name: Run build
if: ${{ steps.release.outputs.release_created }}
run: yarn build
- name: 'Release: Determine npm tag'
if: ${{ steps.release.outputs.release_created }}
id: npm_tag
run: echo "npm_tag=$([[ "${{ steps.release.outputs.version }}" == *"-"* ]] && echo "next" || echo "latest")" >> $GITHUB_OUTPUT
- name: 'Release: Publish @sbb-esta/lyne-design-tokens'
if: ${{ steps.release.outputs.release_created }}
run: yarn publish --tag ${{ steps.npm_tag.outputs.npm_tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}