upgrade overflowdb #5
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: master & release build | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: # allow to manually trigger this workflow | |
jobs: | |
test-codepropertygraph: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
fetch-depth: 0 | |
- name: Clone submodules | |
run: git submodule update --init --recursive | |
- name: apt-get update | |
run: sudo apt-get update | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: 19 | |
- name: Check formatting | |
run: sbt scalafmtCheck Test/scalafmtCheck | |
- run: echo "Previous step failed because code is not formatted. Run 'sbt scalafmt'" | |
if: ${{ failure() }} | |
- name: Check domain classes | |
run: sbt generateDomainClassesCheck | |
- run: echo "Previous step failed because latest domain classes are not committed. Run 'sbt generateDomainClasses' (should be triggered automatically by `sbt compile`, so maybe you just forgot to commit?)" | |
if: ${{ failure() }} | |
- name: Compile and run tests | |
run: sbt +test | |
release: | |
concurrency: release | |
needs: [test-codepropertygraph] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
fetch-depth: 0 | |
- name: Clone submodules | |
run: git submodule update --init --recursive | |
- name: apt-get update | |
run: sudo apt-get update | |
- name: Install gnupg | |
run: sudo apt update && sudo apt install -y gnupg | |
- name: Import GPG key | |
run: echo $PGP_SECRET | base64 --decode | gpg --batch --import | |
env: | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Release to Sonatype | |
run: sbt ciReleaseTagNextVersion ciReleaseSonatype | |
env: | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
- name: Export ENV vars | |
run: | |
echo "LATEST_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.LATEST_TAG }} | |
release_name: ${{ env.LATEST_TAG }} | |
draft: false | |
prerelease: false |