Skip to content

Fix a bug for: trb theme <theme-name> command #11

Fix a bug for: trb theme <theme-name> command

Fix a bug for: trb theme <theme-name> command #11

Workflow file for this run

name: Publish to npm
on:
release:
types: [created]
jobs:
publish-npm:
runs-on: ubuntu-latest
if: github.event.release.target_commitish == 'main'
outputs:
package-version: ${{ steps.get_version.outputs.version }}
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.10.0'
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: npm ci
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Get the package version
id: get_version
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
- name: Notify Slack
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_TITLE: 'Deployment Status'
SLACK_MESSAGE: 'npm package @webredone/trb-cli version ${{ env.PACKAGE_VERSION }} published successfully!'
SLACK_COLOR: '#36a64f'