From 118ef4537c216f2edc1d653bfcd3e86968ce7808 Mon Sep 17 00:00:00 2001 From: "Taro L. Saito" Date: Tue, 11 May 2021 14:11:34 -0700 Subject: [PATCH] Publish a snapshot version for every main branch commit --- .github/workflows/snapshot.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/snapshot.yml diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml new file mode 100644 index 00000000..1fde65f1 --- /dev/null +++ b/.github/workflows/snapshot.yml @@ -0,0 +1,32 @@ +name: Snapshot Release + +on: + push: + branches: + - develop + - main + paths: + - '**.scala' + - '**.java' + - '**.sbt' + tag: + - '!v*' + +jobs: + publish_snapshots: + name: Publish snapshots + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 10000 + # Fetch all tags so that sbt-dynver can find the previous release version + - run: git fetch --tags + - uses: olafurpg/setup-scala@v10 + with: + java-version: adopt@1.11 + - name: Publish snapshots + env: + SONATYPE_USERNAME: '${{ secrets.SONATYPE_USER }}' + SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASS }}' + run: ./sbt publish