-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (68 loc) · 2.46 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Schema update
on:
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: Build
run: npm run build
- id: download
name: Download latest
continue-on-error: true
run: npm run download
- id: generate
name: Generate Types
if: ${{ steps.download.outcome == 'success' || github.event_name == 'workflow_dispatch' }}
run: npm run generate:cached -- --ignore-broken-refs
- name: Generate Types (Legacy)
if: ${{ steps.generate.outcome == 'success' }}
run: npm run generate:legacy -- --ignore-broken-refs
- name: Build with new types
if: ${{ steps.generate.outcome == 'success' }}
run: npm run compile && npm run lint
- name: Configure Git
if: ${{ steps.generate.outcome == 'success' }}
shell: bash
run: |
git config user.email "actions@github.com"
git config user.name "Github Actions"
- id: commit
name: Commit changes
if: ${{ steps.generate.outcome == 'success' }}
continue-on-error: true
run: git add -A && git commit -m "update schemas"
- name: Bump @awboost/cfn-resource-schemas-db
if: ${{ steps.commit.outcome == 'success' }}
run: npm run -w @awboost/cfn-resource-schemas-db bump
- name: Bump @awboost/cfn-resource-types version
if: ${{ steps.commit.outcome == 'success' }}
run: npm run -w @awboost/cfn-resource-types bump
- name: Bump @awboost/cfntypes version
if: ${{ steps.commit.outcome == 'success' }}
run: npm run -w @awboost/cfntypes bump
- name: Push changes
if: ${{ steps.commit.outcome == 'success' }}
run: git push --follow-tags
- name: Publish @awboost/cfn-resource-types
if: ${{ steps.commit.outcome == 'success' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish -w @awboost/cfn-resource-types
- name: Publish @awboost/cfntypes
if: ${{ steps.commit.outcome == 'success' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish -w @awboost/cfntypes