-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (54 loc) · 2.1 KB
/
publish-godel-artifacts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# 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: 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"
echo "GOPATH=$(go env GOPATH)" >> "$GITHUB_ENV"
echo "Set GOPATH=$(go env GOPATH) in GITHUB_ENV at $GITHUB_ENV"
- id: go-dist-info
uses: palantir/github-actions/[email protected]
with:
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@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/github-actions/[email protected]
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: |
${{ env.GOPATH }}/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