chore(main): release 4.4.0 (#3334) #52
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Release latest | |
on: | |
push: | |
tags: ['v3.*', v4.*] | |
permissions: | |
contents: write | |
jobs: | |
version: | |
runs-on: ubuntu-latest | |
outputs: | |
latest-version: ${{steps.latest-version.outputs.version}} | |
package-version: ${{steps.package-version.outputs.current-version}} | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: 'https://registry.npmjs.org' | |
- name: Get latest version from npm | |
id: latest-version | |
run: echo ::set-output name=version::$(npm show @microsoft/mgt version) | |
- name: Get current package version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@master | |
release: | |
runs-on: ubuntu-latest | |
needs: version | |
if: needs.version.outputs.latest-version != needs.version.outputs.package-version | |
strategy: | |
matrix: | |
node-version: [20.x] | |
environment: | |
name: release | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install Dependencies | |
run: | | |
npm install -g yarn lerna | |
yarn | |
- name: Update package version | |
run: node scripts/setVersion.js | |
- name: Build 🛠 | |
run: yarn build | |
- name: Publish npm packages | |
run: lerna exec --scope @microsoft/* -- "npm publish --access=public" | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Notify TeamsFx Repo | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.TEAMSFX_REPO_ACCESS_TOKEN }} | |
repository: OfficeDev/TeamsFx | |
event-type: graph-toolkit-released | |
client-payload: '{"version": "${{ needs.version.outputs.package-version }}"}' | |
storybook: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: 'https://registry.npmjs.org' | |
- name: Build 🛠 | |
run: | | |
npm install -g yarn lerna | |
yarn | |
yarn build | |
yarn storybook:build | |
- name: Deploy mgt.dev 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4.4.1 | |
with: | |
branch: gh-pages | |
folder: storybook-static | |
target-folder: . | |
clean-exclude: next |