All checks were successful
/ Build and Test Library Snapshot (pull_request) Successful in 1m8s
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
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: |
|
|
sbtn clean
|
|
sbtn coverage
|
|
sbtn test
|
|
sbtn coverageReport
|
|
- name: 'Publish Release'
|
|
run: |
|
|
sbtn clean
|
|
sbtn "-Drelease=$GS_RELEASE_TYPE" semVerInfo
|
|
sbtn "-Drelease=$GS_RELEASE_TYPE" semVerWriteVersionToFile
|
|
sbtn "-Drelease=$GS_RELEASE_TYPE" publish
|
|
- name: 'Create Git Tag'
|
|
run: |
|
|
selected_version="$(cat .version)"
|
|
git tag "$selected_version"
|
|
git push origin "$selected_version"
|