v5.122.1 #60
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish packages on NPM | |
| on: | |
| release: | |
| types: [created] | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: "24.x" | |
| registry-url: "https://registry.npmjs.org" | |
| - run: corepack enable && corepack prepare yarn@4.10.3 --activate | |
| - run: yarn | |
| - run: yarn build | |
| - run: npm publish | |
| - 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"'" | |
| }' |