Update action #77
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
name: publish-godel-artifacts | |
on: push | |
jobs: | |
run-godel-publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
##################### | |
# START Go dist setup | |
##################### | |
- id: set-gopath | |
run: | | |
echo "GOPATH=$(go env GOPATH)" >> "$GITHUB_OUTPUT" | |
echo "Set GOPATH=$(go env GOPATH) in GITHUB_OUTPUT at $GITHUB_OUTPUT" | |
- id: go-dist-info | |
uses: palantir/godel/go-dist-info@nmiyake/test-github-actions | |
with: | |
gopath: ${{ steps.set-gopath.outputs.GOPATH }} | |
- id: restore-go-dist-from-cache | |
if: steps.go-dist-info.outputs.go-dist-exists != 'true' | |
uses: actions/cache@v4 | |
with: | |
path: | | |
${{ 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: palantir/godel/go-dist-setup@nmiyake/test-github-actions | |
with: | |
gopath: ${{ steps.set-gopath.outputs.gopath }} | |
go-version: ${{ steps.go-dist-info.outputs.go-dist-version }} | |
##################### | |
# END Go dist setup | |
##################### | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
$GOPATH/go/pkg/mod | |
~/.cache/go-build | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.godel | |
key: ${{ runner.os }}-godel-${{ hashFiles('godelw', 'godel/config/godel.yml') }} | |
- run: ./godelw mod | |
- run: ./godelw dist |