|
1 | 1 | name: CI |
2 | | - |
3 | | -on: |
| 2 | +"on": |
4 | 3 | push: |
5 | 4 | branches: |
6 | 5 | - master |
7 | | - pull_request: |
8 | | - branches: |
9 | | - - master |
10 | | - create: |
11 | | - branches: |
12 | | - - master |
13 | | - |
14 | 6 | jobs: |
15 | 7 | about: |
16 | 8 | runs-on: ubuntu-latest |
17 | 9 | steps: |
18 | 10 | - name: Checkout |
19 | 11 | uses: actions/checkout@v2 |
20 | | - |
21 | 12 | - name: Jaid/action-sync-node-meta |
22 | 13 | uses: jaid/action-sync-node-meta@v1.4.0 |
23 | 14 | with: |
24 | | - direction: overwrite-github # default is overwrite-file |
25 | | - githubToken: ${{ secrets.GITHUB }} |
26 | | - |
| 15 | + direction: overwrite-github |
| 16 | + githubToken: "${{ secrets.GITHUB }}" |
27 | 17 | release: |
28 | 18 | runs-on: ubuntu-latest |
29 | 19 | steps: |
30 | 20 | - name: Checkout |
31 | 21 | uses: actions/checkout@v2 |
32 | | - |
33 | 22 | - name: Semantic Release |
34 | 23 | uses: cycjimmy/semantic-release-action@v2 |
| 24 | + id: semantic |
35 | 25 | with: |
36 | | - # You can specify specifying version range for the extra plugins if you prefer. |
37 | 26 | extra_plugins: | |
38 | 27 | @semantic-release/changelog |
39 | 28 | @semantic-release/npm |
40 | 29 | @semantic-release/git |
41 | 30 | @semantic-release/github |
42 | 31 | env: |
43 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
44 | | - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # Auto Changog generator |
45 | | - |
46 | | - docs: |
| 32 | + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
| 33 | + NPM_TOKEN: "${{ secrets.NPM_TOKEN }}" |
| 34 | + outputs: |
| 35 | + new_release_published: "${{ steps.semantic.outputs.new_release_published }}" |
| 36 | + new_release_version: "${{ steps.semantic.outputs.new_release_version }}" |
| 37 | + cdn: |
47 | 38 | runs-on: ubuntu-latest |
| 39 | + needs: release |
| 40 | + if: needs.release.outputs.new_release_published == 'true' |
| 41 | + env: |
| 42 | + VERSION: "${{ needs.release.outputs.new_release_version }}" |
48 | 43 | steps: |
49 | 44 | - name: Checkout |
50 | 45 | uses: actions/checkout@v2 |
| 46 | + - name: setup nodejs |
| 47 | + uses: actions/setup-node@v2 |
| 48 | + with: |
| 49 | + node-version: 14.15.4 |
| 50 | + - name: yarn install |
| 51 | + run: > |
| 52 | + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > |
| 53 | + .npmrc |
51 | 54 |
|
52 | | - - name: update documentation |
53 | | - uses: CoCreate-app/CoCreate-docs@master |
| 55 | + yarn install |
| 56 | + - name: yarn build |
| 57 | + run: yarn build |
| 58 | + - name: upload bundle as version |
| 59 | + uses: CoCreate-app/CoCreate-s3@master |
| 60 | + with: |
| 61 | + aws-key-id: "${{ secrets.AWSACCESSKEYID }}" |
| 62 | + aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}" |
| 63 | + bucket: testcrudbucket |
| 64 | + source: ./dist |
| 65 | + destination: "/conditional-logic/${{env.VERSION}}" |
| 66 | + acl: public-read |
| 67 | + - name: upload bundle as latest |
| 68 | + uses: CoCreate-app/CoCreate-s3@master |
| 69 | + with: |
| 70 | + aws-key-id: "${{ secrets.AWSACCESSKEYID }}" |
| 71 | + aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}" |
| 72 | + bucket: testcrudbucket |
| 73 | + source: ./dist |
| 74 | + destination: /conditional-logic/latest |
| 75 | + acl: public-read |
54 | 76 |
|
55 | | - cdn: |
| 77 | + dist: |
56 | 78 | runs-on: ubuntu-latest |
57 | 79 | steps: |
58 | 80 | - name: Checkout |
59 | 81 | uses: actions/checkout@v2 |
60 | | - |
61 | | - - name: upload cdn |
62 | | - uses: CoCreate-app/CoCreate-s3@master |
63 | 82 | with: |
64 | | - aws-key-id: ${{ secrets.AWSACCESSKEYID }} |
65 | | - aws-access-key: ${{ secrets.AWSSECERTACCESSKEY }} |
66 | | - source: "./dist/CoCreate-conditional-logic.min.js" |
| 83 | + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
| 84 | + - name: setup nodejs |
| 85 | + uses: actions/setup-node@v2 |
| 86 | + with: |
| 87 | + node-version: 14.15.4 |
| 88 | + - name: yarn install |
| 89 | + run: > |
| 90 | + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > |
| 91 | + .npmrc |
| 92 | +
|
| 93 | + yarn install |
| 94 | + - run: yarn build |
| 95 | + - run: git add . |
| 96 | + - run: git config user.email "frank@cocreate.app" |
| 97 | + - run: git config user.name "frank pagan" |
| 98 | + - run: git commit --allow-empty -m "add dist bundle" |
| 99 | + - run: git push origin master |
0 commit comments