-
Describe the bug After a release is published, I'm attempting to upload the artifacts to GCS using a github action To Reproduce Use this as your github action, set a github secret that's a base64 encoded string of a GCS json key. name: goreleaser
on:
push:
tags:
- '*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@master
with:
project_id: project
service_account_key: ${{ secrets.GCS_UPLOAD }}
export_default_credentials: true
credentials_file_path: ./key.json
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: ${{ github.event.release.tag_name }}
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOOGLE_APPLICATION_CREDENTIALS: ./key.json # Visit https://goreleaser.com for documentation on how to customize this
# behavior.
before:
hooks:
# this is just an example and not a requirement for provider building/publishing
- go mod tidy
builds:
- env:
# goreleaser does not work with CGO, it could also complicate
# usage by users in CI/CD systems like Terraform Cloud where
# they are unable to install libraries.
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- '-s -w -X cmd.version={{.Version}} -X cmd.commit={{.Commit}}'
goos:
- freebsd
- windows
- linux
- darwin
goarch:
- amd64
- '386'
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
- goos: darwin
goarch: arm64
binary: 'tbd'
archives:
- format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
release:
# If you want to manually examine the release before its live, uncomment this line:
# draft: true
changelog:
skip: true
blobs:
-
provider: gs
bucket: bucket-name
folder: "{{.Version}}"
extra_files:
- glob: foo
- provider: gs
bucket: bucket-name
folder: latest
extra_files:
- glob: foo
Expected behavior The release gets made, artifacts are created and pushed to GCS Github Action, not running on local machine Additional context output from github action:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
thats expected if files are changed. Something on your pipeline is changing that file... you'll need to either fix that or gitignore the file |
Beta Was this translation helpful? Give feedback.
thats expected if files are changed.
Something on your pipeline is changing that file... you'll need to either fix that or gitignore the file