Skip to content

Release 6.3.0

Release 6.3.0 #78

Workflow file for this run

name: Release Package
on:
pull_request:
types: [closed]
branches: [main]
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
pull-requests: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"
- name: Install Node.js dependencies
run: npm ci
- name: Configure npm for publish
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- name: Release package
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release:true')
run: npm run build && npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
post-release:
name: Post Release Actions
runs-on: ubuntu-latest
if: ${{ always() }}
needs:
- publish
steps:
- name: Checkout main branch
uses: actions/checkout@v4.1.7
with:
ref: main
- name: Slack - Success Message
uses: DSdatsme/slack-github-action@env_support
if: ${{ success() && needs.publish.result == 'success' }}
with:
channel-id: ${{ vars.SLACK_CHANNEL_ID }}
payload-file-path: ./.github/resources/slack-payloads/slack-message-template.json
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
# RELEASETAG: ${{ needs.publish.outputs.new_version }}
PRE_TEXT_MESSAGE: "Workflow Passed! :successkid:"
FALLBACK_MESSAGE: "Workflow Passed!"
COLOR: "good"
- name: Slack - Failure Message
uses: DSdatsme/slack-github-action@env_support
if: ${{ failure() || needs.publish.result != 'success' }}
with:
channel-id: ${{ vars.SLACK_CHANNEL_ID }}
payload-file-path: ./.github/resources/slack-payloads/slack-message-template.json
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
# RELEASETAG: ${{ needs.publish.outputs.new_version }}
PRE_TEXT_MESSAGE: "<!channel> Workflow Failed! :x:"
FALLBACK_MESSAGE: "Workflow Failed!"
COLOR: "danger"