forked from feross/buffer
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (46 loc) · 1.29 KB
/
cicd.yaml
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
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
buildAndPublish:
name: Build and publish to NPM (GH)
runs-on: ubuntu-22.04
permissions:
checks: write
contents: read
packages: write
statuses: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'
registry-url: https://npm.pkg.github.com
- name: Install dependencies
run: yarn --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: yarn build
- name: Release
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
run: yarn release
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Notify Google Chat
uses: evidenceprime/google-chat-notifications@master
if: ${{ always() && github.event_name == 'push' }}
with:
title: "Buffer"
subtitle: ${{ github.event.head_commit.message }}
webhookUrl: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
threadKey: QexDHE9oqjI
status: ${{ job.status }}