publish #12
Workflow file for this run
This file contains hidden or 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: | |
| release: | |
| types: [created] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'adopt' | |
| java-version: '21' | |
| - name: Setup sbt launcher | |
| uses: sbt/setup-sbt@v1 | |
| - name: Extract version from release tag | |
| id: extract_version | |
| run: | | |
| version=$(echo "${GITHUB_REF#refs/tags/}") | |
| echo "VERSION=$version" >> $GITHUB_ENV | |
| - name: Update SBT version in build.sbt | |
| run: | | |
| sed -i "s/ThisBuild \/ version := .*/ThisBuild \/ version := \"$VERSION\"/" build.sbt | |
| - name: Compile | |
| run: sbt +compile | |
| - name: Publish | |
| env: | |
| SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
| SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
| run: sbt +publish |