Skip to content

update demo-project #33

update demo-project

update demo-project #33

Workflow file for this run

name: release
concurrency: release
on:
push:
branches: [main]
tags: ["*"]
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: sbt
- uses: sbt/setup-sbt@v1
- run: sudo apt update && sudo apt install -y gnupg
- run: echo $PGP_SECRET | base64 --decode | gpg --batch --import
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
- name: Build, test and tag
shell: bash
run: sbt -v clean test ciReleaseTagNextVersion
- name: Export ENV vars
run: |
echo "LATEST_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo $GITHUB_ENV
- name: Package core (will be uploaded to github release)
shell: bash
run: sbt -v releasePackage
- name: Create github release and upload package
uses: ncipollo/release-action@v1
with:
tag: ${{ env.LATEST_TAG }}
artifacts: "target/srp.zip" # same as in `releasePackage` in build.sbt
artifactErrorsFailBuild: true
- name: Deploy to sonatype and release to maven central
shell: bash
run: sbt -v ciReleaseSonatype
env:
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}