(patch) Scala Version, Docs, Builds
All checks were successful
/ Build and Test Library Snapshot (pull_request) Successful in 1m13s
All checks were successful
/ Build and Test Library Snapshot (pull_request) Successful in 1m13s
This commit is contained in:
parent
c3cb5502e8
commit
111105fc55
5 changed files with 66 additions and 20 deletions
|
@ -34,12 +34,21 @@ jobs:
|
||||||
export GS_RELEASE_TYPE="minor"
|
export GS_RELEASE_TYPE="minor"
|
||||||
elif [[ "$latest_commit_message" == *"(patch)"* ]]; then
|
elif [[ "$latest_commit_message" == *"(patch)"* ]]; then
|
||||||
export GS_RELEASE_TYPE="patch"
|
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
|
else
|
||||||
export GS_RELEASE_TYPE="patch"
|
export GS_RELEASE_TYPE="norelease"
|
||||||
fi
|
fi
|
||||||
|
echo "GS_RELEASE_TYPE=$GS_RELEASE_TYPE" >> $GITHUB_ENV
|
||||||
echo "Previous Git Tag: $latest_git_tag"
|
echo "Previous Git Tag: $latest_git_tag"
|
||||||
echo "Latest Commit: $latest_commit_message ($GS_RELEASE_TYPE) (SNAPSHOT)"
|
echo "Latest Commit: $latest_commit_message ($GS_RELEASE_TYPE) (SNAPSHOT)"
|
||||||
|
if [ "$GS_RELEASE_TYPE" = "norelease" ]; then
|
||||||
|
sbtn -Dsnapshot=true -Drelease="patch" semVerInfo
|
||||||
|
else
|
||||||
sbtn -Dsnapshot=true -Drelease="$GS_RELEASE_TYPE" semVerInfo
|
sbtn -Dsnapshot=true -Drelease="$GS_RELEASE_TYPE" semVerInfo
|
||||||
|
fi
|
||||||
- name: 'Unit Tests and Code Coverage'
|
- name: 'Unit Tests and Code Coverage'
|
||||||
run: |
|
run: |
|
||||||
sbtn clean
|
sbtn clean
|
||||||
|
@ -48,5 +57,10 @@ jobs:
|
||||||
sbtn coverageReport
|
sbtn coverageReport
|
||||||
- name: 'Publish Snapshot'
|
- name: 'Publish Snapshot'
|
||||||
run: |
|
run: |
|
||||||
|
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 clean
|
||||||
sbtn publish
|
sbtn publish
|
||||||
|
fi
|
||||||
|
|
|
@ -35,26 +35,49 @@ jobs:
|
||||||
export GS_RELEASE_TYPE="minor"
|
export GS_RELEASE_TYPE="minor"
|
||||||
elif [[ "$latest_commit_message" == *"(patch)"* ]]; then
|
elif [[ "$latest_commit_message" == *"(patch)"* ]]; then
|
||||||
export GS_RELEASE_TYPE="patch"
|
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
|
else
|
||||||
export GS_RELEASE_TYPE="patch"
|
export GS_RELEASE_TYPE="norelease"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "GS_RELEASE_TYPE=$GS_RELEASE_TYPE" >> $GITHUB_ENV
|
||||||
echo "Previous Git Tag: $latest_git_tag"
|
echo "Previous Git Tag: $latest_git_tag"
|
||||||
echo "Latest Commit: $latest_commit_message"
|
echo "Latest Commit: $latest_commit_message"
|
||||||
echo "Selected Release Type: '$GS_RELEASE_TYPE'"
|
echo "Selected Release Type: '$GS_RELEASE_TYPE'"
|
||||||
|
|
||||||
|
if [ "$GS_RELEASE_TYPE" = "norelease" ]; then
|
||||||
|
echo "Skipping all versioning for 'norelease' commit."
|
||||||
|
else
|
||||||
sbtn -Drelease="$GS_RELEASE_TYPE" semVerInfo
|
sbtn -Drelease="$GS_RELEASE_TYPE" semVerInfo
|
||||||
|
fi
|
||||||
- name: 'Unit Tests and Code Coverage'
|
- name: 'Unit Tests and Code Coverage'
|
||||||
run: |
|
run: |
|
||||||
|
if [ "${{ env.GS_RELEASE_TYPE }}" = "norelease" ]; then
|
||||||
|
echo "Skipping build/test for 'norelease' commit."
|
||||||
|
else
|
||||||
sbtn clean
|
sbtn clean
|
||||||
sbtn coverage
|
sbtn coverage
|
||||||
sbtn test
|
sbtn test
|
||||||
sbtn coverageReport
|
sbtn coverageReport
|
||||||
|
fi
|
||||||
- name: 'Publish Release'
|
- name: 'Publish Release'
|
||||||
run: |
|
run: |
|
||||||
|
if [ "${{ env.GS_RELEASE_TYPE }}" = "norelease" ]; then
|
||||||
|
echo "Skipping publish for 'norelease' commit."
|
||||||
|
else
|
||||||
sbtn clean
|
sbtn clean
|
||||||
sbtn semVerWriteVersionToFile
|
sbtn semVerWriteVersionToFile
|
||||||
sbtn publish
|
sbtn publish
|
||||||
|
fi
|
||||||
- name: 'Create Git Tag'
|
- name: 'Create Git Tag'
|
||||||
run: |
|
run: |
|
||||||
|
if [ "${{ env.GS_RELEASE_TYPE }}" = "norelease" ]; then
|
||||||
|
echo "Skipping Git tag for 'norelease' commit."
|
||||||
|
else
|
||||||
selected_version="$(cat .version)"
|
selected_version="$(cat .version)"
|
||||||
git tag "$selected_version"
|
git tag "$selected_version"
|
||||||
git push origin "$selected_version"
|
git push origin "$selected_version"
|
||||||
|
fi
|
||||||
|
|
11
README.md
11
README.md
|
@ -1,10 +1,14 @@
|
||||||
# gs-slug
|
# 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.
|
Scala 3 Slugs. Slugs are URL-safe restricted string identifiers.
|
||||||
|
|
||||||
- [Usage](#usage)
|
- [Usage](#usage)
|
||||||
|
- [Dependency](#dependency)
|
||||||
|
- [Slug Type](#slug-type)
|
||||||
|
- [Donate](#donate)
|
||||||
|
|
||||||
## Usage
|
## 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
|
where the implementation defines the context. For example, if some organization
|
||||||
owns a number of repositories, each repository might have a `Slug` which is
|
owns a number of repositories, each repository might have a `Slug` which is
|
||||||
unique within that organization.
|
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 / scalaVersion := scala3
|
||||||
ThisBuild / versionScheme := Some("semver-spec")
|
ThisBuild / versionScheme := Some("semver-spec")
|
||||||
|
|
|
@ -29,5 +29,5 @@ externalResolvers := Seq(
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11")
|
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11")
|
||||||
addSbtPlugin("gs" % "sbt-garrity-software" % "0.2.0")
|
addSbtPlugin("gs" % "sbt-garrity-software" % "0.3.0")
|
||||||
addSbtPlugin("gs" % "sbt-gs-semver" % "0.2.2")
|
addSbtPlugin("gs" % "sbt-gs-semver" % "0.3.0")
|
||||||
|
|
Loading…
Add table
Reference in a new issue