solution: shortcut to convert Chain to Protobuf message #23
This file contains hidden or 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: Snapshots | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| publish-gcp-artifacts: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| with: | |
| ref: ${{ github.ref }} | |
| submodules: true | |
| - name: Set up JDK | |
| uses: actions/setup-java@v1 | |
| with: | |
| java-version: 17 | |
| - name: Find Version | |
| id: find_version | |
| run: echo VERSION=$(./gradlew properties | grep ^version | awk '{print $2}') >> $GITHUB_OUTPUT | |
| - name: Check if version is snapshot | |
| id: find_is_snapshot | |
| run: echo IS_SNAPSHOT=$(echo ${{ steps.find_version.outputs.VERSION }} | grep -qi SNAPSHOT && echo true || echo false) >> $GITHUB_OUTPUT | |
| - name: Show version | |
| run: echo ${{ steps.find_version.outputs.VERSION }} | |
| - name: Show is snapshot | |
| run: echo ${{ steps.find_is_snapshot.outputs.IS_SNAPSHOT }} | |
| - name: Check | |
| uses: eskatos/gradle-command-action@v1 | |
| with: | |
| arguments: check | |
| if: steps.find_is_snapshot.outputs.IS_SNAPSHOT == 'true' | |
| - name: Setup GCP | |
| uses: google-github-actions/setup-gcloud@v0 | |
| with: | |
| project_id: ${{ secrets.GCP_PROJECT_ID }} | |
| service_account_key: ${{ secrets.GCP_ARTIFACTS_KEY }} | |
| export_default_credentials: true | |
| if: steps.find_is_snapshot.outputs.IS_SNAPSHOT == 'true' | |
| - name: Upload to GCP | |
| uses: eskatos/gradle-command-action@v1 | |
| with: | |
| arguments: publish | |
| env: | |
| ENABLE_GCP: true | |
| if: steps.find_is_snapshot.outputs.IS_SNAPSHOT == 'true' |