Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ornicar/lila-fishnet
Browse files Browse the repository at this point in the history
* 'master' of github.com:ornicar/lila-fishnet:
  Setting version to 3.0.1-SNAPSHOT
  Setting version to 3.0.0
  Set versioni 3.0.0-SNAPSHOT
  Add sbt-release plugin
  Only publishing on tag
  Add docker.yml
  Update scala3-library to 3.4.2
  • Loading branch information
ornicar committed May 20, 2024
2 parents a6ed7f7 + effbf57 commit 3059f9f
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Create and publish a Docker image
on:
push:
tags:
- v*
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:

- name: Checkout repository
uses: actions/checkout@v4

- name: Setup JVM
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: sbt

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
run: sbt app/Docker/publish
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@ Run code format and auto code refactor with scalafmt & scalafix:
```sh
sbt prepare
```

### release

```bash
sbt release with-defaults
```
3 changes: 1 addition & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import Dependencies.*

inThisBuild(
Seq(
scalaVersion := "3.4.1",
scalaVersion := "3.4.2",
versionScheme := Some("early-semver"),
version := "3.0",
run / fork := true,
run / javaOptions += "-Dconfig.override_with_env_vars=true",
semanticdbEnabled := true, // for scalafix
Expand Down
30 changes: 30 additions & 0 deletions project/BuildPlugin.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import sbt._, Keys._
import sbt.ScriptedPlugin.autoImport._
import sbtrelease.ReleasePlugin, ReleasePlugin.autoImport._, ReleaseTransformations._, ReleaseKeys._
import sbt.ScriptedPlugin.autoImport._

import sbt.plugins.{JvmPlugin, SbtPlugin}

object BuildPlugin extends AutoPlugin {
override def trigger = allRequirements

override def requires = ReleasePlugin

override lazy val projectSettings = releaseSettings

def releaseSettings: Seq[Setting[_]] =
Seq(
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
setNextVersion,
commitNextVersion,
pushChanges
)
)
}
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
addSbtPlugin("nl.gn0s1s" % "sbt-dotenv" % "3.0.0")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")
1 change: 1 addition & 0 deletions version.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ThisBuild / version := "3.0.1-SNAPSHOT"

0 comments on commit 3059f9f

Please sign in to comment.