chore: Add action to warn about potentially risky PR changes #1876
Workflow file for this run
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: Build | |
on: | |
push: | |
branches: | |
- main | |
- release/** | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
job_build_upload: | |
name: Build and upload distribution artifact | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current commit (${{ github.sha }}) | |
uses: actions/checkout@v3 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@7e48093f71aa12588241894ff3695e83c4b5e4b0 # pin@v2.4.2 | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Build Gradle Plugin distribution artifacts | |
run: | | |
cd plugin-build | |
make all | |
- name: Build Kotlin Compiler artifacts | |
run: | | |
cd sentry-kotlin-compiler-plugin | |
make all | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.sha }} | |
path: | | |
${{ github.workspace }}/plugin-build/build/distributions/*.zip | |
${{ github.workspace }}/sentry-kotlin-compiler-plugin/build/distributions/*.zip | |
- name: Verify artifact contents | |
shell: bash | |
run: | | |
zipfile=$(ls -1 plugin-build/build/distributions | grep -v "PluginMarker") | |
filename=${zipfile/\.zip/} | |
unzip plugin-build/build/distributions/$filename.zip -d /tmp | |
find /tmp/$filename | grep "pom-default.xml" | |
unzip /tmp/$filename/$filename.jar -d /tmp/jar/ | |
find /tmp/jar | grep "bin/sentry-cli" | |
cat /tmp/$filename/pom-default.xml | grep -v "dev.gradleplugins" |