Skip to content

Fix publish artifacts step to trigger on tag pushes #348

Fix publish artifacts step to trigger on tag pushes

Fix publish artifacts step to trigger on tag pushes #348

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
name: Build & publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
check-latest: true
- uses: sbt/setup-sbt@v1
- name: Coursier cache
uses: coursier/cache-action@v8
- name: Check formatting
run: sbt fixCheck
- name: Compile and test
run: sbt test
- name: Publish artifacts
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
run: sbt ci-release
ci-passed:
runs-on: ubuntu-latest
needs: build
steps:
- run: ':'