-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (36 loc) · 1.12 KB
/
dist.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
on:
push:
branches:
- release-please--**
name: "Build & Push Dist"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.INTEGRATIONS_FNM_BOT_TOKEN }}
- name: Setup node 20
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: install
run: npm ci
- name: build
run: npm run build
- name: update README
run: |-
MAJOR_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[", ]//g' \
| awk -F. '{ print $1 }')
sed -i "s/\(uses: OctopusDeploy\/create-zip-package-action@\).*/\1v${MAJOR_VERSION}/g" README.md
- name: commit
run: |-
git config --global user.name "team-integrations-fnm-bot"
git config user.email '[email protected]'
git add README.md
git add dist/
git diff-index --quiet HEAD || (git commit -m "chore: build dist and update README" && git push origin)