forked from google-gemini/gemini-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
99 lines (91 loc) · 3.25 KB
/
action.yml
File metadata and controls
99 lines (91 loc) · 3.25 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: 'Publish Release'
description: 'Builds, prepares, and publishes the gemini-cli packages to npm and creates a GitHub release.'
inputs:
release-version:
description: 'The version to release (e.g., 0.1.11).'
required: true
npm-tag:
description: 'The npm tag to publish with (e.g., latest, preview, nightly).'
required: true
wombat-token-core:
description: 'The npm token for the @blocksuser/gemini-cli-core package.'
required: true
wombat-token-cli:
description: 'The npm token for the @blocksuser/gemini-cli package.'
required: true
github-token:
description: 'The GitHub token for creating the release.'
required: true
dry-run:
description: 'Whether to run in dry-run mode.'
required: true
release-branch:
description: 'The branch to target for the release.'
required: true
previous-tag:
description: 'The previous tag to use for generating release notes.'
required: true
working-directory:
description: 'The working directory to run the steps in.'
required: false
default: '.'
runs:
using: 'composite'
steps:
- name: 'Build and Prepare Packages'
working-directory: '${{ inputs.working-directory }}'
run: |-
npm run build:packages
npm run prepare:package
shell: 'bash'
- name: 'Configure npm for publishing'
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020'
with:
node-version-file: '${{ inputs.working-directory }}/.nvmrc'
registry-url: 'https://wombat-dressing-room.appspot.com'
scope: '@google'
- name: 'Publish @blocksuser/gemini-cli-core'
working-directory: '${{ inputs.working-directory }}'
env:
NODE_AUTH_TOKEN: '${{ inputs.wombat-token-core }}'
run: |-
npm publish \
--dry-run="${{ inputs.dry-run }}" \
--workspace="@blocksuser/gemini-cli-core" \
--tag="${{ inputs.npm-tag }}"
shell: 'bash'
- name: 'Install latest core package'
working-directory: '${{ inputs.working-directory }}'
if: '${{ inputs.dry-run == "false" }}'
run: |-
npm install "@blocksuser/gemini-cli-core@${{ inputs.release-version }}" \
--workspace="@blocksuser/gemini-cli" \
--save-exact
shell: 'bash'
- name: 'Publish @blocksuser/gemini-cli'
working-directory: '${{ inputs.working-directory }}'
env:
NODE_AUTH_TOKEN: '${{ inputs.wombat-token-cli }}'
run: |-
npm publish \
--dry-run="${{ inputs.dry-run }}" \
--workspace="@blocksuser/gemini-cli" \
--tag="${{ inputs.npm-tag }}"
shell: 'bash'
- name: 'Bundle'
working-directory: '${{ inputs.working-directory }}'
run: 'npm run bundle'
shell: 'bash'
- name: 'Create GitHub Release'
working-directory: '${{ inputs.working-directory }}'
if: '${{ inputs.dry-run == "false" }}'
env:
GITHUB_TOKEN: '${{ inputs.github-token }}'
run: |-
gh release create "v${{ inputs.release-version }}" \
bundle/gemini.js \
--target "${{ inputs.release-branch }}" \
--title "Release v${{ inputs.release-version }}" \
--notes-start-tag "${{ inputs.previous-tag }}" \
--generate-notes
shell: 'bash'