File tree Expand file tree Collapse file tree 3 files changed +66
-3
lines changed Expand file tree Collapse file tree 3 files changed +66
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*.*.*'
7+
8+ env :
9+ TARGETS : |
10+ linux/amd64
11+ linux/arm64
12+ darwin/arm64
13+
14+ permissions :
15+ contents : write
16+
17+ jobs :
18+ build-and-release :
19+ runs-on : ubuntu-latest
20+
21+ steps :
22+ - name : Checkout code
23+ uses : actions/checkout@v4
24+
25+ - name : Set up Go
26+ uses : actions/setup-go@v4
27+
28+ - name : Build
29+ run : |
30+ for target in $TARGETS; do
31+ export GOOS=${target%/*}
32+ export GOARCH=${target#*/}
33+ ./build.sh
34+ mv migration_verifier migration_verifier_${GOOS}_${GOARCH}
35+ done
36+
37+ - name : Create Release
38+ uses : softprops/action-gh-release@v2
39+ env :
40+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41+ with :
42+ files : migration_verifier_*
Original file line number Diff line number Diff line change 1+ # Releasing Migration Verifier
2+
3+ To release Migration Verifier, just create a lightweight git tag, thus:
4+ ```
5+ git tag v0.0.2
6+ ```
7+ … and push it to upstream.
8+
9+ Versions ** MUST** start with a ` v ` and follow
10+ [ semantic versioning] ( https://semver.org/ ) .
11+
12+ An automated release process will build binaries and make them available
13+ for download. Check GitHub Actions for progress.
14+
15+ Note that this process ** DOES NOT** create release notes. Users should peruse
16+ the repository’s commit history for changes.
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- commit =$( git show --no-patch --format= ' %H ' )
3+ revision =$( git describe --tags --exact-match 2> /dev/null || echo " DEVELOPMENT: $( git describe --tags ) " )
44buildTime=$( date -u)
55
6- printf ' Building migration-verifier …\n\tcommit: %s\n\tbuildTime: %s\n' " $commit " " $buildTime "
6+ goos=$( go env GOOS)
7+ goarch=$( go env GOARCH)
78
8- go build -ldflags=" -X 'main.Revision=$commit ' -X 'main.BuildTime=$buildTime '" main/migration_verifier.go
9+ printf ' Building migration-verifier for %s/%s …\n' " $goos " " $goarch "
10+ printf ' \tRevision: %s\n' " $revision "
11+ printf ' \tBuild Time: %s\n' " $buildTime "
12+
13+ go build -ldflags=" -X 'main.Revision=$revision ' -X 'main.BuildTime=$buildTime '" main/migration_verifier.go
You can’t perform that action at this time.
0 commit comments