Skip to content

Commit

Permalink
New release process
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloboni committed Sep 15, 2022
1 parent 81a6bed commit 7a967c9
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup
uses: olafurpg/setup-scala@v11
with:
java-version: "${{ matrix.java }}"
- name: Cache SBT
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.ivy2/cache
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Release
on:
push:
tags:
- 'v*.*.*'
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
PGP_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}
PGP_SECRET: ${{ secrets.GPG_SECRET_KEY }}
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: olafurpg/setup-scala@v11
with:
java-version: openjdk@1.11
- name: Cache SBT
uses: actions/cache@v3
with:
path: |
~/.ivy2/cache
~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
- name: Set version
run: |
VERSION=${{ github.ref_name }}
echo "VERSION=${VERSION:1}" >> $GITHUB_ENV
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_SECRET_KEY }}
passphrase: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}
- name: Release
run: sbt 'set version:="${{ env.VERSION }}";release cross with-defaults skip-tests'
shell: bash
timeout-minutes: 10
9 changes: 1 addition & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,8 @@ import ReleaseTransformations._

releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
releaseStepCommand("sonatypeReleaseAll")
)
8 changes: 0 additions & 8 deletions scripts/release.sh

This file was deleted.

0 comments on commit 7a967c9

Please sign in to comment.