Added release build support with an updated SemVer plugin. #3
3 changed files with 41 additions and 1 deletions
39
.forgejo/workflows/release.yaml
Normal file
39
.forgejo/workflows/release.yaml
Normal file
|
@ -0,0 +1,39 @@
|
|||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
releaseType:
|
||||
description: 'Release Type'
|
||||
required: true
|
||||
default: 'patch'
|
||||
type: choice
|
||||
options:
|
||||
- major
|
||||
- minor
|
||||
- patch
|
||||
|
||||
jobs:
|
||||
library_release:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: registry.garrity.co:8443/gs/ci-scala:latest
|
||||
name: 'Build and Release Library'
|
||||
env:
|
||||
GS_MAVEN_USER: ${{ vars.GS_MAVEN_USER }}
|
||||
GS_MAVEN_TOKEN: ${{ secrets.GS_MAVEN_TOKEN }}
|
||||
GS_RELEASE_TYPE: ${{ inputs.releaseType }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
name: 'Checkout Repository'
|
||||
- name: 'Pre-Commit'
|
||||
run: |
|
||||
pre-commit install
|
||||
pre-commit run --all-files
|
||||
- name: 'Unit Tests and Code Coverage'
|
||||
run: sbt clean coverage test coverageReport
|
||||
- name: 'Publish Release'
|
||||
run: sbt "-Drelease=$GS_RELEASE_TYPE" clean semVerWriteVersionToFile publish
|
||||
- name: 'Create Git Tag'
|
||||
run: |
|
||||
selected_version="$(cat .version)"
|
||||
git tag "$selected_version"
|
||||
git push origin "$selected_version"
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@ target/
|
|||
project/target/
|
||||
project/project/
|
||||
modules/core/target/
|
||||
.version
|
||||
|
|
|
@ -30,4 +30,4 @@ externalResolvers := Seq(
|
|||
|
||||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11")
|
||||
addSbtPlugin("gs" % "sbt-garrity-software" % "0.2.0")
|
||||
addSbtPlugin("gs" % "sbt-gs-semver" % "0.2.0")
|
||||
addSbtPlugin("gs" % "sbt-gs-semver" % "0.2.1")
|
||||
|
|
Loading…
Add table
Reference in a new issue