Skip to content

feat(ref: no-ref): release #43

feat(ref: no-ref): release

feat(ref: no-ref): release #43

Workflow file for this run

name: Publish npm
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Build library
run: |
bun i
bun run build:lib
- name: Setup npm token
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.npm_token }}" > dist/ngx-copypaste-lib/.npmrc
- name: Publish library
run: bun 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: ${{ env.NPM_PACKAGE_URL }}"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}