-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.02 KB
/
publish.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
name: 'Bump & Publish'
on:
push:
paths:
- '*.js'
- 'package.json'
- 'yarn.lock'
- '.github/workflows/publish.yml'
- '.releaserc'
branches:
- 'main'
workflow_dispatch:
jobs:
publish:
name: 'Bump & Publish'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PLURAL_BOT_PAT }}
- name: Read Node.js version from package.json
run: echo ::set-output name=nodeVersion::$(node -p "require('./package.json').engines.node")
id: engines
- name: 'Setup Node'
uses: actions/setup-node@v3
with:
node-version: ${{ steps.engines.outputs.nodeVersion }}
registry-url: 'https://registry.npmjs.org'
- name: 'Install Dependencies'
run: yarn install --immutable
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.PLURAL_BOT_PAT }}
NODE_AUTH_TOKEN: ${{ secrets.PLURAL_BOT_NPM_TOKEN }}