Skip to content

[fix] version should be handled by sbt-dynver (#10) #29

[fix] version should be handled by sbt-dynver (#10)

[fix] version should be handled by sbt-dynver (#10) #29

Workflow file for this run

name: Continuous Integration
on:
pull_request:
branches: [ '**' ]
push:
branches: [ master ]
tags: [ "*" ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
name: Build and Test
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
distribution: temurin
java: 17
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "${{ matrix.distribution }}"
java-version: "${{ matrix.java }}"
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Build project
run: sbt -v scalafmtCheckAll test scripted
env:
PROTOFETCH_GIT_PROTOCOL: https
- name: Compress target directories
run: tar cf targets.tar target sbt-protofetch/target project/target
- name: Upload target directories
uses: actions/upload-artifact@v4
with:
name: target-${{ matrix.java }}
path: targets.tar
publish:
name: Publish Artifacts
needs: [ build ]
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
runs-on: ubuntu-latest
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java (temurin@17)
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Download target directories
uses: actions/download-artifact@v4
with:
name: target-17
- name: Inflate target directories
run: |
tar xf targets.tar
rm targets.tar
- name: Publish project
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 }}