Publish #1
This file contains 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: Publish | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
sbt: | |
name: sbt publish | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'sbt' | |
- name: Publish | |
run: |- | |
cp .jvmopts-ci .jvmopts | |
export SourceBranchName=`echo "$GITHUB_REF" | cut -b 12-` # cuts the first 12 characters, namely "refs/heads/" | |
echo "Will build on branch $SourceBranchName." | |
git checkout "$SourceBranchName" | |
git config --global user.email "[email protected]" | |
git config --global user.name "baker release pipeline" | |
git remote set-url origin "https://github.com/ing-bank/baker" | |
sbt release cross with-defaults | |
env: | |
# PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
# PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
USERNAME: ${{ secrets.PUBLISH_USERNAME }} | |
PASSWORD: ${{ secrets.PUBLISH_PASSWORD }} |