Merge pull request #188 from SpineEventEngine/update-recordspec-api #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Spine's Google Cloud library | |
on: | |
push: | |
branches: [master] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: zulu | |
cache: gradle | |
- name: Decrypt CloudRepo credentials | |
run: ./config/scripts/decrypt.sh "$CLOUDREPO_CREDENTIALS_KEY" ./.github/keys/cloudrepo.properties.gpg ./cloudrepo.properties | |
env: | |
CLOUDREPO_CREDENTIALS_KEY: ${{ secrets.CLOUDREPO_CREDENTIALS_KEY }} | |
- name: Decrypt Git SSH credentials | |
run: ./config/scripts/decrypt.sh "$GIT_CREDENTIALS_KEY" ./.github/keys/deploy_key_rsa.gpg ./deploy_key_rsa | |
env: | |
GIT_CREDENTIALS_KEY: ${{ secrets.GIT_CREDENTIALS_KEY }} | |
# Make sure the SSH key is not "too visible". SSH agent will not accept it otherwise. | |
- name: Set file system permissions | |
run: chmod 400 ./deploy_key_rsa && chmod +x ./config/scripts/register-ssh-key.sh | |
- name: Decrypt GCS credentials | |
run: ./config/scripts/decrypt.sh "$GCS_CREDENTIALS_KEY" ./.github/keys/gcs-auth-key.json.gpg ./gcs-auth-key.json | |
env: | |
GCS_CREDENTIALS_KEY: ${{ secrets.GCS_CREDENTIALS_KEY }} | |
- name: Decrypt GCAR credentials | |
run: ./config/scripts/decrypt.sh "$MAVEN_PUBLISHER_KEY" ./.github/keys/maven-publisher.json.gpg ./maven-publisher.json | |
env: | |
MAVEN_PUBLISHER_KEY: ${{ secrets.MAVEN_PUBLISHER_KEY }} | |
# This operation is specific to `gcloud-java` repository only. | |
- name: Decrypt the credentials for the Spine-Dev service account | |
run: ./config/scripts/decrypt.sh "$SPINE_DEV_CI_KEY" ./.github/keys/spine-dev-framework-ci.json.gpg ./spine-dev.json | |
env: | |
SPINE_DEV_CI_KEY: ${{ secrets.SPINE_DEV_CI_KEY }} | |
- name: Publish artifacts to Maven | |
run: ./gradlew build publish -x test --stacktrace | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
FORMAL_GIT_HUB_PAGES_AUTHOR: developers@spine.io | |
# https://docs.github.com/en/actions/reference/environment-variables | |
REPO_SLUG: $GITHUB_REPOSITORY # e.g. SpineEventEngine/core-java | |
GOOGLE_APPLICATION_CREDENTIALS: ./maven-publisher.json |