Skip to content

Commit c415f47

Browse files
authored
chore: enable release-please workflow (#319)
1 parent cfa9bb0 commit c415f47

File tree

3 files changed

+974
-17
lines changed

3 files changed

+974
-17
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Relevent docs:
2+
# - https://github.com/googleapis/release-please
3+
# - https://github.com/googleapis/release-please-action
4+
5+
on:
6+
workflow_dispatch:
7+
8+
push:
9+
branches:
10+
- main
11+
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
16+
name: release-please
17+
18+
jobs:
19+
release-please:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: googleapis/release-please-action@v4
23+
id: release
24+
with:
25+
token: ${{ secrets.MIME_RELEASE_PLEASE_TOKEN }}
26+
release-type: node
27+
28+
- run: echo "Release created?... ${{ steps.release.outputs.release_created }}"
29+
30+
# Steps below handle publication to NPM
31+
- uses: actions/checkout@v4
32+
if: ${{ steps.release.outputs.release_created }}
33+
- uses: actions/setup-node@v4
34+
with:
35+
node-version: 20
36+
registry-url: 'https://registry.npmjs.org'
37+
if: ${{ steps.release.outputs.release_created }}
38+
39+
- run: npm ci
40+
if: ${{ steps.release.outputs.release_created }}
41+
42+
- run: npm test
43+
if: ${{ steps.release.outputs.release_created }}
44+
45+
- run: npm publish
46+
env:
47+
NODE_AUTH_TOKEN: ${{secrets.MIME_NPM_RELEASE_TOKEN}}
48+
if: ${{ steps.release.outputs.release_created }}

0 commit comments

Comments
 (0)