-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathaction.yml
More file actions
45 lines (41 loc) · 1.25 KB
/
action.yml
File metadata and controls
45 lines (41 loc) · 1.25 KB
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
name: 'Publish Release Steps'
description: 'Steps to run when packages are published'
inputs:
publishedPackages:
description: 'Published packages JSON'
required: true
slackWebhook:
description: 'Slack webhook URL'
required: true
runs:
using: 'composite'
steps:
- name: Format publishedPackages for Slack
id: slackify
shell: bash
run: |
raw='${{ inputs.publishedPackages }}'
message=$(echo "$raw" | jq -r '.[] | "- \(.name) v\(.version)"')
echo "message<<EOF" >> $GITHUB_OUTPUT
echo "$message" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Send to Slack Workflow
uses: slackapi/slack-github-action@v2.1.1
with:
webhook: ${{ inputs.slackWebhook }}
webhook-type: webhook-trigger
payload: >
{
"publishedPackages": "${{ steps.slackify.outputs.message }}"
}
- name: Run Builds
shell: bash
run: pnpm nx run-many -t build --no-agents --skip-nx-cache
- name: Generate API Docs
shell: bash
run: pnpm generate-docs
- name: Publish api docs
uses: JamesIves/github-pages-deploy-action@v4.7.4
with:
folder: docs
commit-message: 'chore: release-api-docs'