Skip to content

Scala 3.5.0-RC7 (#73) #72

Scala 3.5.0-RC7 (#73)

Scala 3.5.0-RC7 (#73) #72

Workflow file for this run

name: Release
on:
push:
branches: [main]
tags: ["v*"]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
# - uses: olafurpg/setup-gpg@v3
- name: Publish ${{ github.ref }}
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 }}
- name: Check git diff
if: ${{ failure() }}
run: git diff
- name: Print published version
if: github.ref == 'refs/heads/main'
run: |
VERSION=$(sbt -no-colors 'inspect version' | grep "Setting: java.lang.String" | cut -d '=' -f2 | tr -d ' ')
echo '### Snapshot version' >> $GITHUB_STEP_SUMMARY
echo "version: $VERSION" >> $GITHUB_STEP_SUMMARY
website:
runs-on: ubuntu-latest
needs: publish
# We only publish the website on release
if: startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: 'sbt'
- run: sbt 'docs/docusaurusPublishGhpages'
env:
GIT_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
- name: Check git diff
if: ${{ failure() }}
run: git diff