From 70c917622c0787a0a9f3ab94274472dcbfcd69c1 Mon Sep 17 00:00:00 2001 From: "andrey.levchaev" Date: Thu, 30 May 2024 16:28:08 +0300 Subject: [PATCH] fix(no-ref): workflow --- .github/workflows/publish.yml | 134 +++++++++++++++++----------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6b4f3764..6c054ef5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,73 +1,73 @@ name: Publish npm on: - push: - branches: - - master + push: + branches: + - master jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 20 - registry-url: https://registry.npmjs.org/ - - name: Build library - run: | - npm install --package-lock-only --force - 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@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + - name: Build library + run: | + npm install --package-lock-only --force + 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/slack-github-action@v1.26.0 - 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/slack-github-action@v1.26.0 + 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.NPM_PACKAGE_URL || 'TBA' }}" + } + } + ] + } + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}