add missing minimalBuildSBT.txt #30
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: Release | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| tags: [ "**" ] | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| id-token: write | |
| # | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 8 | |
| cache: sbt | |
| - uses: sbt/setup-sbt@v1 | |
| # Since monosat compilation is time-consuming try first to find the binaries in cache | |
| - name: Cache Monosat JAR and SO | |
| id: cache-monosat | |
| uses: actions/cache@v3 | |
| env: | |
| cache-name: cache-monosat-module | |
| with: | |
| path: | | |
| lib/monosat.jar | |
| binlib/libmonosat.so | |
| key: ${{ runner.os }}-build-${{ env.cache-name }} | |
| # If cache miss first get monosat source files | |
| - if: ${{ steps.cache-monosat.outputs.cache-hit != 'true' }} | |
| name: Get Monosat | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: sambayless/monosat | |
| path: monosat | |
| # If cache miss configure project | |
| - if: ${{ steps.cache-monosat.outputs.cache-hit != 'true' }} | |
| name: Configure Project | |
| uses: threeal/[email protected] | |
| with: | |
| source-dir: 'monosat' | |
| args: '-DJAVA=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5' | |
| # If cache miss compile monosat | |
| - if: ${{ steps.cache-monosat.outputs.cache-hit != 'true' }} | |
| name: Compile Monosat | |
| run: make | |
| working-directory: 'monosat/build' | |
| # If cache miss put monosat.jar in local lib | |
| - if: ${{ steps.cache-monosat.outputs.cache-hit != 'true' }} | |
| name: Moving monosat.jar and monosat.so | |
| run: | | |
| cp monosat/build/monosat.jar lib | |
| mkdir binlib | |
| cp monosat/build/libmonosat.so binlib | |
| - name: Publish the release to Central | |
| run: sbt ci-release | |
| env: | |
| PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
| PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
| SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
| SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} |