-
Notifications
You must be signed in to change notification settings - Fork 21
58 lines (48 loc) · 1.89 KB
/
release.yml
File metadata and controls
58 lines (48 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: MCP Server Release
on:
push:
branches:
- main
jobs:
release:
name: Create a PR for release workflow
runs-on: ubuntu-latest
# Skip if commit message contains [skip ci], [ci skip], or docs:
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]') && !startsWith(github.event.head_commit.message, 'docs:')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Build the package
run: npm run build
- name: Create Version PR or Publish to NPM
id: changesets
uses: changesets/action@v1
with:
commit: "chore(release): version packages"
title: "chore(release): version packages"
version: npm run version
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create GitHub Release
if: steps.changesets.outputs.published == 'true'
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ fromJson(steps.changesets.outputs.publishedPackages)[0].version }}
name: Release v${{ fromJson(steps.changesets.outputs.publishedPackages)[0].version }}
body: |
## What's Changed
${{ fromJson(steps.changesets.outputs.publishedPackages)[0].changelog }}
**Full Changelog**: https://github.com/mhmzdev/figma-flutter-mcp/compare/v${{ fromJson(steps.changesets.outputs.publishedPackages)[0].version }}...HEAD
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}