Repository navigation
Version bumps for the github action steps #6
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: gh-actions | ||
| run-name: ${{ github.actor }} triggered a Github Action | ||
| on: | ||
| push: | ||
| branches: | ||
| - "**" # Regular commits to any branch | ||
| tags: | ||
| - "v*" # Version tags starting with 'v' | ||
| .action-versions: | ||
| cache: &cache-action actions/cache@v6 | ||
| checkout: &checkout-action actions/checkout@v7 | ||
| setup-java: &setup-java-action actions/setup-java@v5 | ||
| setup-sbt: &setup-sbt-action sbt/setup-sbt@v1 | ||
| jobs: | ||
| sanity-checks: | ||
| if: github.ref_type == 'branch' | ||
| env: | ||
| MC_TOKEN_USER: ${{ secrets.MAVEN_CENTRAL_TOKEN_USER }} | ||
| MC_TOKEN_PASS: ${{ secrets.MAVEN_CENTRAL_TOKEN_PASSWORD }} | ||
| SBT_VERSION: 1.12.15 | ||
| SBT_OPTS: "-Xms512M -Xmx1536M -Xss1M" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: *checkout-action | ||
| - name: Setup JDK | ||
| uses: *setup-java-action | ||
| with: | ||
| distribution: temurin | ||
| java-version: 11 | ||
| - name: Setup sbt launcher | ||
| uses: *setup-sbt-action | ||
| - name: Cache SBT | ||
| uses: *cache-action | ||
| with: | ||
| path: | | ||
| ~/.ivy2/cache | ||
| ~/.sbt | ||
| key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }} | ||
| - name: Organisation secrets | ||
| run: | | ||
| echo "MAVEN_CENTRAL_TOKEN_USER starts with ${MC_TOKEN_USER:0:1} and is ${#MC_TOKEN_USER} long" | ||
| echo "MAVEN_CENTRAL_TOKEN_PASSWORD starts with ${MC_TOKEN_PASS:0:1} and is ${#MC_TOKEN_PASS} long" | ||
| - name: Perform the tests | ||
| run: sbt clean test:compile scripted | ||
| release-on-tag: | ||
| if: github.ref_type == 'tag' | ||
| env: | ||
| MC_TOKEN_USER: ${{ secrets.MAVEN_CENTRAL_TOKEN_USER }} | ||
| MC_TOKEN_PASS: ${{ secrets.MAVEN_CENTRAL_TOKEN_PASSWORD }} | ||
| SBT_VERSION: 1.12.15 | ||
| SBT_OPTS: "-Xms512M -Xmx1536M -Xss1M" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: *checkout-action | ||
| - name: Setup JDK | ||
| uses: *setup-java-action | ||
| with: | ||
| distribution: temurin | ||
| java-version: 17 | ||
| - name: Setup sbt launcher | ||
| uses: *setup-sbt-action | ||
| - name: Cache SBT | ||
| uses: *cache-action | ||
| with: | ||
| path: | | ||
| ~/.ivy2/cache | ||
| ~/.sbt | ||
| key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }} | ||
| - name: Organisation secrets | ||
| run: | | ||
| echo "MAVEN_CENTRAL_TOKEN_USER starts with ${MC_TOKEN_USER:0:1} and is ${#MC_TOKEN_USER} long" | ||
| echo "MAVEN_CENTRAL_TOKEN_PASSWORD starts with ${MC_TOKEN_PASS:0:1} and is ${#MC_TOKEN_PASS} long" | ||
| - name: Publish to Maven Central | ||
| run: sbt clean test:compile scripted | ||