You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project uses semantic versioning (`vMAJOR.MINOR.PATCH`) with GitHub Releases. Pushing a version tag triggers CI to build, test, and deploy to Cloud Run.
515
523
516
-
See [DEPLOYMENT.md](./docs/DEPLOYMENT.md) for complete deployment guide.
524
+
### Release Workflow
517
525
518
-
### Google Cloud Run
526
+
1. Merge your changes to `main`.
527
+
2. Run the release script:
519
528
520
529
```bash
521
-
cd github-copier
522
-
./scripts/deploy-cloudrun.sh
530
+
# Preview what will happen (no changes made)
531
+
./scripts/release.sh v1.2.0 --dry-run
532
+
533
+
# Create the release
534
+
./scripts/release.sh v1.2.0
523
535
```
524
536
525
-
### Docker
537
+
The script:
538
+
1. Validates the version format and that the working tree is clean on `main`
539
+
2. Renames the `[Unreleased]` section in `CHANGELOG.md` to `[v1.2.0] - YYYY-MM-DD`
540
+
3. Commits the changelog update and creates an annotated git tag
541
+
4. Pushes the tag to origin — this triggers the CI `deploy` job
542
+
5. Creates a GitHub Release with the changelog excerpt
543
+
544
+
### CI Deploy Pipeline
545
+
546
+
The `deploy` job in `.github/workflows/ci.yml` runs only on version tag pushes:
547
+
548
+
- Authenticates to Google Cloud via Workload Identity Federation
549
+
- Deploys to Cloud Run with the version stamped as a build arg (`VERSION`)
550
+
- Tags the Cloud Run revision with the version for easy rollback
551
+
552
+
### Version Stamping
553
+
554
+
The version tag is injected at build time via `-ldflags`:
526
555
527
556
```bash
528
-
docker build -t github-copier .
529
-
docker run -p 8080:8080 --env-file env.yaml github-copier
557
+
go build -ldflags "-X main.Version=v1.2.0" -o github-copier .
530
558
```
531
559
560
+
The version appears in the startup banner and the `/health` endpoint response.
561
+
562
+
## Deployment
563
+
564
+
See [DEPLOYMENT.md](./docs/DEPLOYMENT.md) for the complete deployment and rollback guide.
0 commit comments