-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use go-distribution-oss CircleCI template (#852)
- Loading branch information
Showing
6 changed files
with
108 additions
and
1,828 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Mark .circleci/config.yml as generated for github reviews | ||
config.yml linguist-generated=true |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env bash | ||
export CIRCLECI_TEMPLATE=go-distribution-oss |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,60 @@ | ||
# This file was generated by the excavator check 'excavator/manage-circleci' as specified in .circleci/template.sh. | ||
# To request a modification to the general template, file an issue on Excavator. | ||
# To manually manage the CircleCI configuration for this project, remove the .circleci/template.sh file. | ||
|
||
name: publish-godel-artifacts | ||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
run-godel-publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
##################### | ||
# START Go dist setup | ||
##################### | ||
- id: set-gopath | ||
run: echo "::set-output name=GOPATH::$(go env GOPATH)" | ||
run: | | ||
echo "GOPATH=$(go env GOPATH)" >> "$GITHUB_OUTPUT" | ||
echo "Set GOPATH=$(go env GOPATH) in GITHUB_OUTPUT at $GITHUB_OUTPUT" | ||
echo "GOPATH=$(go env GOPATH)" >> "$GITHUB_ENV" | ||
echo "Set GOPATH=$(go env GOPATH) in GITHUB_ENV at $GITHUB_ENV" | ||
- id: go-dist-info | ||
uses: ./.github/actions/go-dist-info | ||
uses: palantir/github-actions/go-dist-info@0.1.0 | ||
with: | ||
gopath: ${{ steps.set-gopath.outputs.gopath }} | ||
gopath: ${{ steps.set-gopath.outputs.GOPATH }} | ||
go-version: go1.23.4 | ||
- id: restore-go-dist-from-cache | ||
if: steps.go-dist-info.outputs.go-dist-exists != 'true' | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
${{ steps.set-gopath.outputs.gopath }}/go-dists/${{ steps.go-dist-info.outputs.go-dist-version }} | ||
${{ steps.set-gopath.outputs.GOPATH }}/go-dists/${{ steps.go-dist-info.outputs.go-dist-version }} | ||
key: ${{ runner.os }}-${{ steps.go-dist-info.outputs.go-dist-version }} | ||
- id: go-dist-setup | ||
uses: ./.github/actions/go-dist-setup | ||
uses: palantir/github-actions/go-dist-setup@0.1.0 | ||
with: | ||
gopath: ${{ steps.set-gopath.outputs.gopath }} | ||
go-version: ${{ steps.go-dist-info.outputs.go-dist-version }} | ||
##################### | ||
# END Go dist setup | ||
##################### | ||
- uses: actions/cache@v2 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
${{ env.GOPATH }}/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
- uses: actions/cache@v2 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.godel | ||
key: ${{ runner.os }}-godel-${{ hashFiles('godelw', 'godel/config/godel.yml') }} | ||
- run: ./godelw mod | ||
- run: ./godelw dist | ||
env: | ||
GOPATH: "/home/runner/go" | ||
- run: ./godelw publish github --add-v-prefix --api-url=$GITHUB_API_URL --user=palantir --repository=godel --token=${{ secrets.GITHUB_TOKEN }} | ||
env: | ||
GOPATH: "/home/runner/go" |