Skip to content

Commit c9abfaf

Browse files
committed
set version as output
1 parent 7b36ad0 commit c9abfaf

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/bintray.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ jobs:
1717
with:
1818
go-version: '1.15'
1919
- uses: jfrog/setup-jfrog-cli@v1
20-
- run: go run scripts/build/main.go
20+
- id: gobuild
21+
run: go run scripts/build/main.go
22+
- run: echo ${{steps.gobuild.outputs.version}}
2123
- run: zip -X -j sqlc-devel-darwin-amd64.zip ./sqlc
2224
- run: tar -zcvf sqlc-devel-darwin-amd64.tar.gz ./sqlc
2325
- run: jfrog bt upload --user kyleconroy --key "$BINTRAY_API_KEY" --publish --override "sqlc-devel-darwin-amd64.*" sqlc/devel/sqlc/"$GITHUB_SHA" "$GITHUB_SHA"/

scripts/build/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ func main() {
2626
version = fmt.Sprintf("v0.0.0-%s-%s", date, sha[:12])
2727
}
2828

29+
fmt.Printf("::set-output name=version::%s\n", version)
30+
2931
x := "-X github.com/kyleconroy/sqlc/internal/cmd.version=" + version
3032
args := []string{
3133
"build",

0 commit comments

Comments
 (0)