Skip to content

Merge pull request #202 from kevin-lee/prepare-to-release #17

Merge pull request #202 from kevin-lee/prepare-to-release

Merge pull request #202 from kevin-lee/prepare-to-release #17

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
env:
GH_JAVA_VERSION: "adopt@1.8"
GH_SCALA_BINARY_VERSION: "2.12"
jobs:
gh-release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: olafurpg/setup-scala@v14
with:
java-version: ${{ env.GH_JAVA_VERSION }}
- name: Cache SBT
uses: actions/cache@v3
with:
path: |
~/.ivy2/cache
~/.cache/coursier
~/.sbt
key: ${{ runner.os }}-sbt-${{ env.GH_SCALA_BINARY_VERSION }}-${{ hashFiles('**/*.sbt') }}
restore-keys: |
${{ runner.os }}-sbt-${{ env.GH_SCALA_BINARY_VERSION }}-
- name: sbt GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_AUTH_TOKEN_GITHUB }}
run: |
echo "Run] sbt GitHub release"
echo 'sbt -J-XX:MaxMetaspaceSize=1024m -J-Xmx2048m devOopsGitHubRelease'
sbt \
-J-XX:MaxMetaspaceSize=1024m \
-J-Xmx2048m \
devOopsGitHubRelease
publish:
needs: gh-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v14
with:
java-version: ${{ env.GH_JAVA_VERSION }}
- name: Cache SBT
uses: actions/cache@v3
with:
path: |
~/.ivy2/cache
~/.cache/coursier
~/.sbt
key: ${{ runner.os }}-sbt-${{ env.GH_SCALA_BINARY_VERSION }}-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('**/build.properties') }}
restore-keys: |
${{ runner.os }}-sbt-${{ env.GH_SCALA_BINARY_VERSION }}-
- name: sbt Publish sbt-github-pages
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
run: |
echo "Run] Publish to Maven Central"
echo 'sbt -J-XX:MaxMetaspaceSize=1024m -J-Xmx2048m -v clean test ci-release"'
sbt \
-J-XX:MaxMetaspaceSize=1024m \
-J-Xmx2048m \
-v \
clean \
test \
ci-release
echo "====================="