Skip to content

v5.116.0

v5.116.0 #50

Workflow file for this run

name: Publish packages on NPM
on:
release:
types: [created]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22.x"
registry-url: "https://registry.npmjs.org"
- run: yarn
- run: yarn build
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Send success message to Slack
env:
SLACK_CHANNEL: "#serverless-releases"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
if: success()
run: |
set -x
OPS_MESSAGE=":gh-check-passed: serverless-plugin-datadog NPM publish succeeded!"
curl -H "Content-type: application/json" -X POST "$SLACK_WEBHOOK" -d '{
"channel": "'"$SLACK_CHANNEL"'",
"text": "'"$OPS_MESSAGE"'"
}'
- name: Send failure message to Slack
env:
SLACK_CHANNEL: "#serverless-onboarding-and-enablement-ops"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
if: failure()
run: |
set -x
OPS_MESSAGE=":gh-check-failed: serverless-plugin-datadog NPM publish failed!
Please check GitHub Action log: https://github.com/DataDog/serverless-plugin-datadog/actions/workflows/publish.yml"
curl -H "Content-type: application/json" -X POST "$SLACK_WEBHOOK" -d '{
"channel": "'"$SLACK_CHANNEL"'",
"text": "'"$OPS_MESSAGE"'"
}'