-
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.28 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
name: release-please
on:
push:
branches: ['main']
jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
upload_url: ${{ steps.release.outputs.upload_url }}
major: ${{ steps.release.outputs.major }}
minor: ${{ steps.release.outputs.minor }}
path: ${{ steps.release.outputs.path }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
package-name: 2048-webcomponent
publish:
if: ${{ needs.create-release.outputs.release_created }}
needs: create-release
name: Publish to npm
runs-on: ubuntu-latest
environment:
name: npm
url: https://www.npmjs.com/package/2048-webcomponent
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- name: Setup node env 🏗
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies 👨🏻💻
run: npm ci
- name: Build 🛠
run: npm run build
- name: Publish to npm 📩
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}