Skip to content

Merge pull request #99 from gluestack/fix/create-command-templates #46

Merge pull request #99 from gluestack/fix/create-command-templates

Merge pull request #99 from gluestack/fix/create-command-templates #46

name: Publish Package
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref || github.run_id }}
jobs:
release:
name: Publish version
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Set up Node.js v18.x
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install dependencies (prevent updates to lock file)
run: yarn install --frozen-lockfile
- name: Publish to npm
id: changesets
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: node publish-package
- name: Post to a Slack channel
id: slack
if: steps.changesets.outputs.published == 'true'
uses: slackapi/[email protected]
with:
channel-id: C05H3MUMPN3
slack-message: "A new package was published in ${{ steps.changesets.outputs.packageName }}!\n\nVersion: ${{ toJSON(steps.changesets.outputs.packageVersion) }}"
color: good
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}