-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.5 KB
/
release.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
54
---
name: Release and Publish
on:
workflow_dispatch:
jobs:
release:
if: ${{ github.ref == 'refs/heads/main' }}
name: Create Github Release
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.14.0
registry-url: 'https://registry.npmjs.org'
- name: Install Node.js dependencies
run: yarn
- name: Install Node.js dependencies
run: yarn build
- name: Github release
run: yarn release patch --ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Notify failures
if: failure()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_LINK_NAMES: true
SLACK_MESSAGE:
# prettier-ignore
"hey @${{ github.actor }}, @mark, sorry to let you know you broke the build"
SLACK_CHANNEL: feed-github
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://avatars.githubusercontent.com/u/82425418?s=200&v=4
SLACK_TITLE: 'Failed: cld-cli to dev :fire:'
SLACK_USERNAME: cld-cli-bot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}