Skip to content

Version 1.3.5

Version 1.3.5 #8

name: Deploy release
on:
release:
types: [published]
jobs:
deploy-release:
name: "Deploy release"
runs-on: ${{ vars.PLATFORM }}
env:
NPM_TOKEN: ${{ secrets.WHEREBY_PUBLISH_GITHUB_PACKAGES }}
GITHUB_TOKEN: ${{ secrets.WHEREBY_PUBLISH_GITHUB_PACKAGES }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Prepare repository
run: git fetch --unshallow --tags
- name: Setup npmrc
run: echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> ~/.npmrc
- name: Use Node.js ${{ vars.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ vars.NODE_VERSION }}
- uses: voxmedia/github-action-slack-notify-build@v1
id: slack
with:
channel_id: ${{ vars.WHEREBY_DEPLOYMENT_SLACK_CHANNEL_ID }}
status: STARTED
color: warning
env:
SLACK_BOT_TOKEN: ${{ secrets.WHEREBY_DEPLOYMENT_SLACK_BOT_TOKEN }}
- name: Install
run: yarn install --frozen-lockfile
- name: Create Release
run: npm publish
- uses: voxmedia/github-action-slack-notify-build@v1
if: success()
with:
# Updates existing message from the first step
message_id: ${{ steps.slack.outputs.message_id }}
channel_id: ${{ vars.WHEREBY_DEPLOYMENT_SLACK_CHANNEL_ID }}
status: SUCCESS
color: good
env:
SLACK_BOT_TOKEN: ${{ secrets.WHEREBY_DEPLOYMENT_SLACK_BOT_TOKEN }}
- uses: voxmedia/github-action-slack-notify-build@v1
if: failure()
with:
# Updates existing message from the first step
message_id: ${{ steps.slack.outputs.message_id }}
channel_id: ${{ vars.WHEREBY_DEPLOYMENT_SLACK_CHANNEL_ID }}
status: FAILURE
color: danger
env:
SLACK_BOT_TOKEN: ${{ secrets.WHEREBY_DEPLOYMENT_SLACK_BOT_TOKEN }}