Add go package upload

This commit is contained in:
Ryan McGuire 2024-12-16 16:32:35 -05:00
parent a69963dbf3
commit 3031f52411

View File

@ -8,6 +8,7 @@ env:
BINARY_PATH: bin BINARY_PATH: bin
BINARY_NAME: eia-client BINARY_NAME: eia-client
GO_MOD_PATH: gitea.libretechconsulting.com/50W/eia-api-go GO_MOD_PATH: gitea.libretechconsulting.com/50W/eia-api-go
GITEA_HOST: gitea.libretechconsulting.com
GOPRIVATE: gitea.libretechconsulting.com/* GOPRIVATE: gitea.libretechconsulting.com/*
# DOCKER_HOST: "unix:///var/run/user/1000/docker.sock" # DOCKER_HOST: "unix:///var/run/user/1000/docker.sock"
# DOCKER_ORG: "rmcguire" # DOCKER_ORG: "rmcguire"
@ -45,6 +46,7 @@ jobs:
- name: Generate and Upload Package to Go Registry - name: Generate and Upload Package to Go Registry
run: | run: |
go list --json go list --json
echo "machine ${GITEA_HOST} login ${GITHUB_REPOSITORY_OWNER} password ${API_TOKEN}" > ~/.netrc
go mod download -x --json ${GO_MOD_PATH}@${{ github.ref_name }} 2>&1 go mod download -x --json ${GO_MOD_PATH}@${{ github.ref_name }} 2>&1
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo "Failed to generage go package archive for ${GO_MOD_PATH}@${{ github.ref_name }}" echo "Failed to generage go package archive for ${GO_MOD_PATH}@${{ github.ref_name }}"