Skip to content

Commit 06d6981

Browse files
authored
docs: append additional line to testreleaseprocess.md (#21)
* docs: append additional line to testreleaseprocess.md * docs: clean up release.md - remove duplicates and clarify workflow * docs: remove outdated CLI release docs Delete cli/docs/release.md and cli/docs/testreleaseprocess.md which were redundant/outdated. * chore: update cli/.goreleaser.yml — add archive format/name_template, fix LICENSE path, remove snapshot template * chore: normalize working-directory and fix paths in release workflow and goreleaser config - Set default shell to bash and remove global working-directory; specify working-directory per step - Run dashboard build, git tagging and goreleaser release from cli directory - Update azd publish to use repository registry.json and cli/dist artifact paths - Adjust cli/.goreleaser.yml file patterns to reference LICENSE and cli/* paths correctly * chore: remove duplicate GITHUB_TOKEN env entry in release workflow * chore: refine release workflow, fix GoReleaser config, add test script - .github/workflows/release-please.yml: normalize PR title/commit to include "v", expand PR body with current/new version and release type, add next-steps, and use branch name release/v{version} - cli/.goreleaser.yml: use Windows-friendly hook, remove hardcoded archive format (use overrides), correct dashboard dist path to cli/src/internal/dashboard/dist, ensure dir set for build - add test-release.ps1: PowerShell helper to build dashboard and run goreleaser in snapshot mode for local testing * chore: remove redundant GoReleaser 'before' hook (dashboard built in workflow) * chore: align goreleaser config with cli working dir, update release workflow, add cli .gitignore - Copy LICENSE into cli in the release workflow and pass -f .goreleaser.yml to goreleaser - Remove redundant dir: cli and strip cli/ prefixes in cli/.goreleaser.yml so asset paths are relative - Add cli/.gitignore to ignore copied LICENSE and generated dist/ artifacts * chore: remove working-directory from Create git tag step in release workflow * chore: install azd extensions in release workflow before registry update * chore: add MIT License to cli and remove LICENSE ignore from .gitignore * chore: remove LICENSE copy step from release workflow * chore: run azd x publish from cli and fix registry/artifacts paths in release workflow * chore: enable GitHub releases in cli/.goreleaser.yml (add owner/name, name_template, draft and prerelease) * chore: pass tag-style version (v$VERSION) to azd x publish in release workflow
1 parent bca6166 commit 06d6981

File tree

6 files changed

+87
-23
lines changed

6 files changed

+87
-23
lines changed

.github/workflows/release-please.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,23 @@ jobs:
9090
uses: peter-evans/create-pull-request@v6
9191
with:
9292
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
93-
commit-message: "Prepare release ${{ steps.next.outputs.version }}"
94-
title: "Release ${{ steps.next.outputs.version }}"
93+
commit-message: "Prepare release v${{ steps.next.outputs.version }}"
94+
title: "Prepare release v${{ steps.next.outputs.version }}"
9595
body: |
96-
Prepare release ${{ steps.next.outputs.version }}
96+
## Release v${{ steps.next.outputs.version }}
97+
98+
**Current version:** v${{ steps.current.outputs.version }}
99+
**New version:** v${{ steps.next.outputs.version }}
100+
**Release type:** ${{ inputs.release-type }}
97101
98102
This PR updates:
99-
- Version in extension.yaml
100-
- CHANGELOG.md
101-
- Release manifest
103+
- Version in `cli/extension.yaml`
104+
- `cli/CHANGELOG.md`
105+
- `.release-please-manifest.json`
102106
103-
After merging, run the Release workflow to publish.
104-
branch: release/${{ steps.next.outputs.version }}
107+
### Next Steps
108+
1. Review the changes
109+
2. Merge this PR
110+
3. Run the **Release** workflow with version `${{ steps.next.outputs.version }}`
111+
branch: release/v${{ steps.next.outputs.version }}
105112
delete-branch: true

.github/workflows/release.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,28 @@ jobs:
5959
install-only: true
6060

6161
- name: Build binaries and create release
62-
run: goreleaser release --clean
62+
run: goreleaser release --clean -f .goreleaser.yml
6363
env:
6464
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6565
working-directory: cli
6666

6767
- name: Install azd CLI
6868
run: |
6969
curl -fsSL https://aka.ms/install-azd.sh | bash
70+
71+
- name: Install azd extensions
72+
run: |
73+
azd extension install microsoft.azd.extensions
74+
7075
- name: Update registry
7176
run: |
7277
VERSION="${{ inputs.version }}"
7378
7479
azd x publish \
75-
--registry registry.json \
76-
--version "$VERSION" \
77-
--artifacts "cli/dist/*.zip,cli/dist/*.tar.gz" \
80+
--cwd cli \
81+
--registry ../registry.json \
82+
--version "v$VERSION" \
83+
--artifacts "dist/*.zip,dist/*.tar.gz" \
7884
--repo "${{ github.repository }}"
7985
8086
# Commit registry.json back to main

cli/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# GoReleaser artifacts
2+
dist/

cli/.goreleaser.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ version: 2
22

33
project_name: azd-app-cli
44

5-
before:
6-
hooks:
7-
# Dashboard is built separately in the workflow
8-
- echo "Dashboard already built"
9-
105
builds:
116
- id: azd-app
127
main: ./src/cmd/app
@@ -30,25 +25,28 @@ builds:
3025

3126
archives:
3227
- id: azd-app-cli
33-
format: tar.gz
3428
name_template: >-
3529
azd-app-cli-{{ .Os }}-{{ .Arch }}
3630
format_overrides:
3731
- goos: windows
3832
format: zip
3933
files:
4034
- LICENSE
41-
- cli/README.md
42-
- cli/extension.yaml
43-
- cli/dashboard/dist/**/*
35+
- README.md
36+
- extension.yaml
37+
- src/internal/dashboard/dist/**/*
4438

4539
checksum:
4640
name_template: 'checksums.txt'
4741
algorithm: sha256
4842

49-
# Don't create a release - we use azd x release for that
5043
release:
51-
disable: true
44+
github:
45+
owner: jongio
46+
name: azd-app
47+
name_template: "v{{.Version}}"
48+
draft: false
49+
prerelease: auto
5250

5351
# Don't publish anywhere - we use azd x publish for that
5452
publishers:

cli/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Jon Gallant (jongio)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

cli/scripts/test-release.ps1

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env pwsh
2+
# Quick test script for GoReleaser configuration
3+
# This runs GoReleaser in snapshot mode (no actual release)
4+
5+
Write-Host "Testing GoReleaser configuration..." -ForegroundColor Cyan
6+
7+
# Check if goreleaser is installed
8+
if (-not (Get-Command goreleaser -ErrorAction SilentlyContinue)) {
9+
Write-Host "Installing GoReleaser..." -ForegroundColor Yellow
10+
go install github.com/goreleaser/goreleaser/v2@latest
11+
}
12+
13+
# Build dashboard first
14+
Write-Host "Building dashboard..." -ForegroundColor Cyan
15+
Push-Location cli/dashboard
16+
npm ci
17+
npm run build
18+
Pop-Location
19+
20+
# Run goreleaser in snapshot mode (doesn't create a release)
21+
Write-Host "Running GoReleaser in snapshot mode..." -ForegroundColor Cyan
22+
goreleaser release --snapshot --clean --skip=publish -f cli/.goreleaser.yml
23+
24+
if ($LASTEXITCODE -eq 0) {
25+
Write-Host "`n✓ GoReleaser test successful!" -ForegroundColor Green
26+
Write-Host "Check the 'dist' directory for generated artifacts" -ForegroundColor Green
27+
} else {
28+
Write-Host "`n✗ GoReleaser test failed" -ForegroundColor Red
29+
exit 1
30+
}

0 commit comments

Comments
 (0)