Skip to content

Merge pull request #146 from snyk/fix/HEAD-447_custom_path #322

Merge pull request #146 from snyk/fix/HEAD-447_custom_path

Merge pull request #146 from snyk/fix/HEAD-447_custom_path #322

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Build Plugin with Maven
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'zulu'
cache: maven
- name: Decode Keystore
id: decode_keystore
if: ${{ matrix.os == 'ubuntu-latest' }}
env:
fileName: ./keystore.jks
encodedString: ${{ secrets.KEYSTORE }}
run: |
echo "$encodedString" | base64 -d > $fileName
echo "6cab9fa86689a9969097a662891fe8a1d8752ac430c18750cfa4d230744ac4a7 $fileName" > sha256.txt
sha256sum -c sha256.txt
- name: Build with Maven
if: ${{ matrix.os == 'ubuntu-latest' }}
run: ./mvnw clean verify -P sign
env:
KEYSTORE_PASS: ${{ secrets.KEYSTORE_PASS }}
- name: Build with Maven
if: ${{ matrix.os != 'ubuntu-latest' }}
run: |
./mvnw clean verify
- name: Authenticate to GCS
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest' }}
id: 'auth'
uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.gcp_credentials_2 }}'
- name: Publish to Marketplace bucket
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest' }}
uses: 'google-github-actions/upload-cloud-storage@v0'
with:
path: "./update-site/target/repository/"
destination: "snyk-eclipse-plugin-test/preview-2.1"
predefinedAcl: publicRead