Merge pull request #84 from fmonniot/update/cats-effect-3.5.5 #84
Workflow file for this run
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: 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 |