-
-
Notifications
You must be signed in to change notification settings - Fork 114
82 lines (69 loc) · 2.32 KB
/
release-please.yml
File metadata and controls
82 lines (69 loc) · 2.32 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Release Please
on:
push:
branches:
- main
workflow_dispatch:
inputs:
tag:
description: 'Git tag to publish (e.g., mcp-server-azure-devops-v0.1.44). Leave empty to run normal release-please process.'
required: false
type: string
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
jobs:
release-please:
runs-on: ubuntu-latest
# Only run release-please if no tag was specified (normal automated flow)
if: ${{ github.event.inputs.tag == '' || github.event.inputs.tag == null }}
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
config-file: .github/release-please-config.json
manifest-file: .github/release-please-manifest.json
# The following steps only run if a new release is created
- name: Checkout code
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4
with:
ref: ${{ steps.release.outputs.tag_name }}
- name: Setup Node.js
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org/'
- name: Install Dependencies
if: ${{ steps.release.outputs.release_created }}
run: npm ci
- name: Build package
if: ${{ steps.release.outputs.release_created }}
run: npm run build
- name: Publish to npm
if: ${{ steps.release.outputs.release_created }}
run: npm publish --provenance --access public
# Manual publish job - runs when a tag is manually specified
manual-publish:
runs-on: ubuntu-latest
# Only run if a tag was manually specified
if: ${{ github.event.inputs.tag != '' && github.event.inputs.tag != null }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org/'
- name: Install Dependencies
run: npm ci
- name: Build package
run: npm run build
- name: Publish to npm
run: npm publish --provenance --access public