Skip to content

Commit

Permalink
Add input var enable-packages-upload.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdoss committed Aug 8, 2024
1 parent c537351 commit 13e1cf1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
required: false
type: string
default: 'v2.2.3'
enable-packages-upload:
required: false
type: boolean
default: false
goprivate:
required: false
type: string
Expand Down Expand Up @@ -92,17 +96,20 @@ jobs:
RELEASE_DATE=$(date -u +"%y-%m-%d")
echo "RELEASE_DATE=${RELEASE_DATE}" >> "${GITHUB_ENV}"
- name: Authenticate to Google Cloud
if: inputs.enable-packages-upload
id: gcloud-auth
uses: google-github-actions/auth@v2
with:
token_format: access_token
workload_identity_provider: ${{ secrets.GOOGLE_CLOUD_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_CLOUD_GITHUB_SERVICE_ACCOUNT }}
- name: Set up Google Cloud SDK
if: inputs.enable-packages-upload
uses: google-github-actions/setup-gcloud@v2
with:
project_id: ${{ secrets.GOOGLE_CLOUD_PACKAGES_PROJECT_ID }}
- name: Write GPG private key to file
if: inputs.enable-packages-upload
run: |
echo "${GPG_PRIVATE_KEY}" > "${GPG_PRIVATE_KEY_FILE}"
shell: bash
Expand Down

0 comments on commit 13e1cf1

Please sign in to comment.