Create release.yaml

This commit is contained in:
y4ssi 2025-02-05 23:06:54 -07:00 committed by GitHub
parent c3fc832074
commit 33c90abe84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 45 additions and 0 deletions

45
.github/workflows/release.yaml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Deploy GCP on Tagging
on:
push:
tags:
- '*' # Runs when any tag is pushed
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Google Cloud SDK
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
- name: Configure gsutil
run: gcloud auth activate-service-account --key-file <(echo '${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}')
- name: Download file from GCS
run: gsutil -q cp gs://${{ secrets.GCP_PROJECT_ID_PROD }}-apt-packages/encrypted_gpg.kms encrypted_gpg.kms
- name: Decrypt file using KMS
run: |
gcloud kms decrypt \
--key gpg \
--keyring gpg \
--location global \
--plaintext-file private.pgp \
--ciphertext-file encrypted_gpg.kms
- name: Import GPG
run: |
gpg --import private.pgp
- name: Import GPG
run: |
gpg --import private.pgp
- name: Show Public GPG Key Info
run: gpg --list-keys