|
13 | 13 | - '.github/PULL_REQUEST_TEMPLATE.md' |
14 | 14 |
|
15 | 15 | jobs: |
| 16 | + create_release: |
| 17 | + uses: fullstack-devops/actions/.github/workflows/create-release.yml@main |
| 18 | + secrets: |
| 19 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 20 | + |
16 | 21 | build: |
17 | 22 | runs-on: ubuntu-latest |
| 23 | + needs: create_release |
18 | 24 | steps: |
19 | 25 | - name: Checkout code |
20 | 26 | uses: actions/checkout@v2 |
| 27 | + - name: Setup awesome-ci |
| 28 | + uses: fullstack-devops/awesome-ci-action@main |
21 | 29 | - name: Setup node |
22 | 30 | uses: actions/setup-node@v2 |
23 | 31 | with: |
24 | | - node-version: '14.x' |
25 | | - - name: Setup awesome-ci |
26 | | - run: | |
27 | | - wget https://github.com/fullstack-devops/awesome-ci/releases/download/0.7.5/awesome-ci |
28 | | - chmod +x awesome-ci |
29 | | - - name: install npm packages |
| 32 | + node-version: '16.x' |
| 33 | + |
| 34 | + - name: install packages |
| 35 | + run: yarn |
| 36 | + - name: build applikation |
| 37 | + run: yarn run build |
| 38 | + |
| 39 | + - name: dryrun publish |
| 40 | + working-directory: dist/material-calendar |
30 | 41 | run: | |
31 | | - # Retry 3 times before the steps actually fails |
32 | | - (echo "===== NPM Install Attempt: 1 ====" && npm ci) || \ |
33 | | - (echo "===== NPM Install Attempt: 2 ====" && npm ci) || \ |
34 | | - (echo "===== NPM Install Attempt: 3 ====" && npm ci) || \ |
35 | | - (echo "==== NPM Install Step Failed ====" && exit 1) |
36 | | - - name: package Applikation |
37 | | - run: npm run build |
38 | | - - name: set publish config |
39 | | - shell: bash |
40 | | - run: npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} |
41 | | - env: |
42 | | - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
43 | | - - name: Create Release and Publish |
44 | | - run: ./awesome-ci createRelease -publishNpm dist/material-calendar/ |
| 42 | + npm version ${{ needs.generate_infos.outputs.version }} |
| 43 | + npm publish -dry-run |
| 44 | +
|
| 45 | + - name: Publish release |
| 46 | + run: awesome-ci release publish -releaseid "${{ needs.generate_infos.outputs.releaseid }}" |
45 | 47 | env: |
46 | 48 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 49 | + |
| 50 | + - name: set publish config |
| 51 | + shell: bash |
| 52 | + run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_PUBLISH_TOKEN }} |
0 commit comments