|
1 | 1 | name: Publish npm |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - master |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - build: |
10 | | - runs-on: ubuntu-latest |
11 | | - steps: |
12 | | - - uses: actions/checkout@v4 |
13 | | - - uses: actions/setup-node@v4 |
14 | | - with: |
15 | | - node-version: 20 |
16 | | - registry-url: https://registry.npmjs.org/ |
17 | | - - name: Build library |
18 | | - run: | |
19 | | - npm ci --force |
20 | | - git submodule update --init --recursive --remote |
21 | | - npm run build:lib |
22 | | - - name: Publish library |
23 | | - run: npm run publish:lib |
24 | | - env: |
25 | | - NODE_AUTH_TOKEN: ${{secrets.npm_token}} |
| 9 | + build: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - uses: actions/checkout@v4 |
| 13 | + - uses: actions/setup-node@v4 |
| 14 | + with: |
| 15 | + node-version: 20 |
| 16 | + registry-url: https://registry.npmjs.org/ |
| 17 | + - name: Build library |
| 18 | + run: | |
| 19 | + npm ci --force |
| 20 | + git submodule update --init --recursive --remote |
| 21 | + npm run build:lib |
| 22 | + - name: Publish library |
| 23 | + run: npm run publish:lib |
| 24 | + env: |
| 25 | + NODE_AUTH_TOKEN: ${{secrets.npm_token}} |
26 | 26 |
|
27 | | - slack_notification: |
28 | | - needs: |
29 | | - - build |
30 | | - runs-on: ubuntu-latest |
31 | | - steps: |
32 | | - - name: Post to a Slack channel |
33 | | - id: slack |
34 | | - |
35 | | - with: |
36 | | - channel-id: 'deployments' |
37 | | - payload: | |
38 | | - { |
39 | | - "text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}", |
40 | | - "blocks": [ |
41 | | - { |
42 | | - "type": "section", |
43 | | - "text": { |
44 | | - "type": "mrkdwn", |
45 | | - "text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}" |
46 | | - } |
47 | | - }, |
48 | | - { |
49 | | - "type": "section" |
50 | | - "text": { |
51 | | - "type": "mrkdwn", |
52 | | - "text": "Project: `${{ github.event.repository.name }}`" |
53 | | - } |
54 | | - }, |
55 | | - { |
56 | | - "type": "section", |
57 | | - "text": { |
58 | | - "type": "mrkdwn", |
59 | | - "text": "Commit/PR URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}" |
60 | | - } |
61 | | - }, |
62 | | - { |
63 | | - "type": "section", |
64 | | - "text": { |
65 | | - "type": "mrkdwn", |
66 | | - "text": "Website URL: ${{ secrets.WEBSITE_URL || 'TBA' }}" |
67 | | - } |
68 | | - } |
69 | | - ] |
70 | | - } |
71 | | - env: |
72 | | - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |
| 27 | + slack_notification: |
| 28 | + needs: |
| 29 | + - build |
| 30 | + runs-on: ubuntu-latest |
| 31 | + steps: |
| 32 | + - name: Post to a Slack channel |
| 33 | + id: slack |
| 34 | + |
| 35 | + with: |
| 36 | + channel-id: 'deployments' |
| 37 | + payload: | |
| 38 | + { |
| 39 | + "text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}", |
| 40 | + "blocks": [ |
| 41 | + { |
| 42 | + "type": "section", |
| 43 | + "text": { |
| 44 | + "type": "mrkdwn", |
| 45 | + "text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}" |
| 46 | + } |
| 47 | + }, |
| 48 | + { |
| 49 | + "type": "section", |
| 50 | + "text": { |
| 51 | + "type": "mrkdwn", |
| 52 | + "text": "Project: `${{ github.event.repository.name }}`" |
| 53 | + } |
| 54 | + }, |
| 55 | + { |
| 56 | + "type": "section", |
| 57 | + "text": { |
| 58 | + "type": "mrkdwn", |
| 59 | + "text": "Commit/PR URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}" |
| 60 | + } |
| 61 | + }, |
| 62 | + { |
| 63 | + "type": "section", |
| 64 | + "text": { |
| 65 | + "type": "mrkdwn", |
| 66 | + "text": "Website URL: ${{ secrets.WEBSITE_URL || 'TBA' }}" |
| 67 | + } |
| 68 | + } |
| 69 | + ] |
| 70 | + } |
| 71 | + env: |
| 72 | + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |
0 commit comments