Skip to content

Commit 8ca6f0f

Browse files
committed
ci: use release-please
1 parent a3263cb commit 8ca6f0f

File tree

3 files changed

+38
-30
lines changed

3 files changed

+38
-30
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release Please
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: google-github-actions/release-please-action@v3
11+
id: release
12+
with:
13+
release-type: node
14+
package-name: "@textea/functions"
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
if: ${{ steps.release.outputs.release_created }}
19+
- name: Use Node.js LTS
20+
uses: actions/setup-node@v3
21+
if: ${{ steps.release.outputs.release_created }}
22+
with:
23+
node-version-file: ".nvmrc"
24+
cache: "yarn"
25+
registry-url: "https://registry.npmjs.org"
26+
- name: Install dependencies
27+
if: ${{ steps.release.outputs.release_created }}
28+
run: yarn install
29+
- name: Build Output
30+
if: ${{ steps.release.outputs.release_created }}
31+
run: yarn build
32+
- uses: JS-DevTools/npm-publish@v1
33+
name: Publish to npm
34+
if: ${{ steps.release.outputs.release_created }}
35+
with:
36+
access: "public"
37+
token: ${{ secrets.NPM_TOKEN }}

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lts/*

0 commit comments

Comments
 (0)