|
3 | 3 | # To create a release, please follow the steps documented in the "Build &
|
4 | 4 | # Publish" section of the README.md file.
|
5 | 5 |
|
6 |
| -name: Upload Package |
| 6 | +name: Test Upload Package |
7 | 7 | on:
|
8 | 8 | push:
|
9 | 9 | tags:
|
10 |
| - - v[0-9]+.[0-9]+.[0-9]+ |
11 |
| - |
12 |
| -permissions: |
13 |
| - contents: write |
| 10 | + - test[0-9]+.[0-9]+.[0-9]+ |
14 | 11 |
|
15 | 12 | jobs:
|
16 |
| - test: |
17 |
| - uses: ./.github/workflows/end-to-end-tests.yml |
18 |
| - secrets: inherit |
19 |
| - |
20 | 13 | publish:
|
21 | 14 | runs-on: ubuntu-20.04
|
22 |
| - needs: test |
23 | 15 | steps:
|
24 | 16 | - uses: actions/checkout@v4
|
25 | 17 | - name: Stop early if the tag fails any validation
|
26 |
| - run: sh validate-version.sh ${{ github.ref_name }} |
27 |
| - # Setup .npmrc file to publish to npm |
| 18 | + run: sh validate-version.sh ${{ github.ref_name }} || true |
28 | 19 | - uses: actions/setup-node@v4
|
29 | 20 | with:
|
30 | 21 | node-version: 20
|
31 |
| - registry-url: "https://registry.npmjs.org" |
32 |
| - scope: "@readalongs" |
33 | 22 | - run: npm install
|
34 | 23 | - name: Build and bundle
|
35 | 24 | run: |
|
|
40 | 29 | run: |
|
41 | 30 | sed -i 's/(\.\.\/web-component)/(web-component)/g' dist/packages/ngx-web-component/README.md
|
42 | 31 | sed -i 's/(test-data\//(https:\/\/github.com\/ReadAlongs\/Studio-Web\/blob\/${{ github.ref_name }}\/packages\/web-component\/test-data\//g' dist/packages/web-component/README.md
|
43 |
| - - name: Publish web-component to npmjs |
44 |
| - run: | |
45 |
| - cd dist/packages/web-component && npm publish --access=public |
46 |
| - env: |
47 |
| - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
48 |
| - - name: Publish ngx-web-component to npmjs |
| 32 | + - name: show the updated readmes |
49 | 33 | run: |
|
50 |
| - cd dist/packages/ngx-web-component && npm publish --access=public |
51 |
| - env: |
52 |
| - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
53 |
| - - name: Update CHANGELOG |
54 |
| - id: changelog |
55 |
| - uses: requarks/changelog-action@v1 |
56 |
| - with: |
57 |
| - token: ${{ github.token }} |
58 |
| - tag: ${{ github.ref_name }} |
59 |
| - - name: Create a GitHub release |
60 |
| - uses: ncipollo/release-action@v1 |
61 |
| - env: |
62 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
63 |
| - with: |
64 |
| - tag: ${{ github.ref_name }} |
65 |
| - name: Release ${{ github.ref_name }} |
66 |
| - body: ${{ steps.changelog.outputs.changes }} |
67 |
| - |
68 |
| - deploy: |
69 |
| - needs: publish |
70 |
| - uses: ./.github/workflows/deploy.yml |
71 |
| - secrets: inherit |
| 34 | + echo dist/packages/web-component/README.md |
| 35 | + cat dist/packages/web-component/README.md |
| 36 | + echo dist/packages/ngx-web-component/README.md |
| 37 | + cat dist/packages/ngx-web-component/README.md |
0 commit comments