Skip to content

Tag component (#651) #445

Tag component (#651)

Tag component (#651) #445

Workflow file for this run

name: Release
on:
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
release:
if: github.repository == 'microsoft/atlas-design'
permissions:
contents: write # to create release (changesets/action)
pull-requests: write # to create pull request (changesets/action)
name: Release
runs-on: windows-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20.9.0
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: npm ci
# https://github.com/changesets/action
- name: Publish on version increment
uses: changesets/action@v1
id: changesets
with:
publish: npx changeset publish
env:
HOME: ${{ github.workspace }} # https://github.com/changesets/action/issues/147
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# When changesets has published a new version of @microsoft/atlas-css, then we can attempt to publish a new extension version too.
- name: Publish VSCode extension on version increment
#
if: ${{ steps.changesets.outputs.published == 'true' && contains(steps.changesets.outputs.publishedPackages.*.name, '@microsoft/atlas-css') }}
run: npm run publish:extension
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}