Skip to content

Commit

Permalink
fix(no-ref): workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lachesse committed May 30, 2024
1 parent c209161 commit 83857e8
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 67 deletions.
132 changes: 66 additions & 66 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
name: Publish npm

on:
push:
branches:
- master
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Build library
run: |
npm ci --force
git submodule update --init --recursive --remote
npm run build:lib
- name: Publish library
run: npm run publish:lib
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Build library
run: |
npm ci --force
git submodule update --init --recursive --remote
npm run build:lib
- name: Publish library
run: npm run publish:lib
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

slack_notification:
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'deployments'
payload: |
{
"text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}"
}
},
{
"type": "section"
"text": {
"type": "mrkdwn",
"text": "Project: `${{ github.event.repository.name }}`"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Commit/PR URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Website URL: ${{ secrets.WEBSITE_URL || 'TBA' }}"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
slack_notification:
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'deployments'
payload: |
{
"text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action build result: ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Project: `${{ github.event.repository.name }}`"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Commit/PR URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Website URL: ${{ secrets.WEBSITE_URL || 'TBA' }}"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

0 comments on commit 83857e8

Please sign in to comment.