(patch) Scala Version, Docs, Builds (#2)
All checks were successful
/ Build and Release Library (push) Successful in 1m17s
All checks were successful
/ Build and Release Library (push) Successful in 1m17s
Reviewed-on: #2
This commit is contained in:
parent
c3cb5502e8
commit
1571323ba7
5 changed files with 66 additions and 20 deletions
|
@ -34,12 +34,21 @@ jobs:
|
|||
export GS_RELEASE_TYPE="minor"
|
||||
elif [[ "$latest_commit_message" == *"(patch)"* ]]; then
|
||||
export GS_RELEASE_TYPE="patch"
|
||||
elif [[ "$latest_commit_message" == *"(docs)"* ]]; then
|
||||
export GS_RELEASE_TYPE="norelease"
|
||||
elif [[ "$latest_commit_message" == *"(norelease)"* ]]; then
|
||||
export GS_RELEASE_TYPE="norelease"
|
||||
else
|
||||
export GS_RELEASE_TYPE="patch"
|
||||
export GS_RELEASE_TYPE="norelease"
|
||||
fi
|
||||
echo "GS_RELEASE_TYPE=$GS_RELEASE_TYPE" >> $GITHUB_ENV
|
||||
echo "Previous Git Tag: $latest_git_tag"
|
||||
echo "Latest Commit: $latest_commit_message ($GS_RELEASE_TYPE) (SNAPSHOT)"
|
||||
sbtn -Dsnapshot=true -Drelease="$GS_RELEASE_TYPE" semVerInfo
|
||||
if [ "$GS_RELEASE_TYPE" = "norelease" ]; then
|
||||
sbtn -Dsnapshot=true -Drelease="patch" semVerInfo
|
||||
else
|
||||
sbtn -Dsnapshot=true -Drelease="$GS_RELEASE_TYPE" semVerInfo
|
||||
fi
|
||||
- name: 'Unit Tests and Code Coverage'
|
||||
run: |
|
||||
sbtn clean
|
||||
|
@ -48,5 +57,10 @@ jobs:
|
|||
sbtn coverageReport
|
||||
- name: 'Publish Snapshot'
|
||||
run: |
|
||||
sbtn clean
|
||||
sbtn publish
|
||||
echo "Testing env var propagation = ${{ env.GS_RELEASE_TYPE }}"
|
||||
if [ "${{ env.GS_RELEASE_TYPE }}" = "norelease" ]; then
|
||||
echo "Skipping publish due to GS_RELEASE_TYPE=norelease"
|
||||
else
|
||||
sbtn clean
|
||||
sbtn publish
|
||||
fi
|
||||
|
|
|
@ -35,26 +35,49 @@ jobs:
|
|||
export GS_RELEASE_TYPE="minor"
|
||||
elif [[ "$latest_commit_message" == *"(patch)"* ]]; then
|
||||
export GS_RELEASE_TYPE="patch"
|
||||
elif [[ "$latest_commit_message" == *"(docs)"* ]]; then
|
||||
export GS_RELEASE_TYPE="norelease"
|
||||
elif [[ "$latest_commit_message" == *"(norelease)"* ]]; then
|
||||
export GS_RELEASE_TYPE="norelease"
|
||||
else
|
||||
export GS_RELEASE_TYPE="patch"
|
||||
export GS_RELEASE_TYPE="norelease"
|
||||
fi
|
||||
|
||||
echo "GS_RELEASE_TYPE=$GS_RELEASE_TYPE" >> $GITHUB_ENV
|
||||
echo "Previous Git Tag: $latest_git_tag"
|
||||
echo "Latest Commit: $latest_commit_message"
|
||||
echo "Selected Release Type: '$GS_RELEASE_TYPE'"
|
||||
sbtn -Drelease="$GS_RELEASE_TYPE" semVerInfo
|
||||
|
||||
if [ "$GS_RELEASE_TYPE" = "norelease" ]; then
|
||||
echo "Skipping all versioning for 'norelease' commit."
|
||||
else
|
||||
sbtn -Drelease="$GS_RELEASE_TYPE" semVerInfo
|
||||
fi
|
||||
- name: 'Unit Tests and Code Coverage'
|
||||
run: |
|
||||
sbtn clean
|
||||
sbtn coverage
|
||||
sbtn test
|
||||
sbtn coverageReport
|
||||
if [ "${{ env.GS_RELEASE_TYPE }}" = "norelease" ]; then
|
||||
echo "Skipping build/test for 'norelease' commit."
|
||||
else
|
||||
sbtn clean
|
||||
sbtn coverage
|
||||
sbtn test
|
||||
sbtn coverageReport
|
||||
fi
|
||||
- name: 'Publish Release'
|
||||
run: |
|
||||
sbtn clean
|
||||
sbtn semVerWriteVersionToFile
|
||||
sbtn publish
|
||||
if [ "${{ env.GS_RELEASE_TYPE }}" = "norelease" ]; then
|
||||
echo "Skipping publish for 'norelease' commit."
|
||||
else
|
||||
sbtn clean
|
||||
sbtn semVerWriteVersionToFile
|
||||
sbtn publish
|
||||
fi
|
||||
- name: 'Create Git Tag'
|
||||
run: |
|
||||
selected_version="$(cat .version)"
|
||||
git tag "$selected_version"
|
||||
git push origin "$selected_version"
|
||||
if [ "${{ env.GS_RELEASE_TYPE }}" = "norelease" ]; then
|
||||
echo "Skipping Git tag for 'norelease' commit."
|
||||
else
|
||||
selected_version="$(cat .version)"
|
||||
git tag "$selected_version"
|
||||
git push origin "$selected_version"
|
||||
fi
|
||||
|
|
11
README.md
11
README.md
|
@ -1,10 +1,14 @@
|
|||
# gs-slug
|
||||
|
||||
[License (Apache 2.0)](./LICENSE)
|
||||
[GS Open Source](https://garrity.co/oss.html) |
|
||||
[License (MIT)](./LICENSE)
|
||||
|
||||
Scala 3 Slugs. Slugs are URL-safe restricted string identifiers.
|
||||
|
||||
- [Usage](#usage)
|
||||
- [Dependency](#dependency)
|
||||
- [Slug Type](#slug-type)
|
||||
- [Donate](#donate)
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -37,3 +41,8 @@ Additionally, `Slug` is usually intended to be unique within some _context_,
|
|||
where the implementation defines the context. For example, if some organization
|
||||
owns a number of repositories, each repository might have a `Slug` which is
|
||||
unique within that organization.
|
||||
|
||||
## Donate
|
||||
|
||||
Enjoy this project or want to help me achieve my [goals](https://garrity.co)?
|
||||
Consider [Donating to Pat on Ko-fi](https://ko-fi.com/gspfm).
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
val scala3: String = "3.4.0"
|
||||
val scala3: String = "3.4.1"
|
||||
|
||||
ThisBuild / scalaVersion := scala3
|
||||
ThisBuild / versionScheme := Some("semver-spec")
|
||||
|
|
|
@ -29,5 +29,5 @@ 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.2")
|
||||
addSbtPlugin("gs" % "sbt-garrity-software" % "0.3.0")
|
||||
addSbtPlugin("gs" % "sbt-gs-semver" % "0.3.0")
|
||||
|
|
Loading…
Add table
Reference in a new issue