Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excavator: Manages GitHub action that publishes artifacts to GitHub using godel #514

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 19 additions & 22 deletions .github/workflows/publish-godel-artifacts.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,53 @@
# 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

on:
release:
types:
- created
jobs:
run-godel-publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
#####################
# 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"
run: echo "::set-output name=GOPATH::$(go env GOPATH)"
- id: go-dist-info
uses: palantir/github-actions/go-dist-info@0.1.0
uses: ./.github/actions/go-dist-info
with:
gopath: ${{ steps.set-gopath.outputs.GOPATH }}
go-version: go1.23.2
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
uses: actions/cache@v2
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: palantir/github-actions/go-dist-setup@0.1.0
uses: ./.github/actions/go-dist-setup
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
- uses: actions/cache@v2
with:
path: |
${{ env.GOPATH }}/pkg/mod
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- uses: actions/cache@v4
- uses: actions/cache@v2
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=go-java-launcher --token=${{ secrets.GITHUB_TOKEN }}
env:
GOPATH: "/home/runner/go"