Skip to content

Publish generator-teams #92

Publish generator-teams

Publish generator-teams #92

name: Publish generator-teams
on:
release:
types: [created]
jobs:
publish:
# Only do this for releases with the tag generator-teams
if: "contains(github.event.release.tag_name, 'generator-teams')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
working-directory: packages/generator-teams
- run: npm run build
working-directory: packages/generator-teams
- name: Publish release
if: "!contains(github.ref, 'preview')"
run: npm publish
working-directory: packages/generator-teams
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Publish preview
if: "contains(github.ref, 'preview')"
run: npm publish --tag preview
working-directory: packages/generator-teams
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}