-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (56 loc) · 1.77 KB
/
auto.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Schema update
on:
push:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "npm"
registry-url: "https://registry.npmjs.org"
- name: NPM install
run: npm ci
- name: First build
run: npm run build
- id: download
if: github.ref == 'refs/heads/main'
name: Download latest
run: npm run download
continue-on-error: true
- name: Generate Types
if: steps.download.outcome == 'success'
run: npm run generate:cached
- name: Build with new types
if: steps.download.outcome == 'success'
run: npm run build
- name: Configure Git
if: steps.download.outcome == 'success'
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
run: |
set -e
git config user.email "actions@github.com"
git config user.name "Github Actions"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
- name: Commit changes
if: steps.download.outcome == 'success'
run: |
set -e
git add -A
git commit -m "update schemas"
- name: Bump @awboost/cfn-resource-types version
if: steps.download.outcome == 'success'
run: npm version -w @awboost/cfn-resource-types patch
- name: Publish @awboost/cfn-resource-types
if: steps.download.outcome == 'success'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish -w @awboost/cfn-resource-types