Skip to content

Commit

Permalink
ci: enable releases via auto (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alkaar committed Sep 21, 2022
1 parent 1a70a0f commit 6dde3b4
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 14 deletions.
100 changes: 100 additions & 0 deletions .autorc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"plugins": [
"sbt",
"released"
],
"versionBranches": "version-",
"shipit": {
"noChangelog": true
},
"canary": {
"force": true
},
"noDefaultLabels": true,
"labels": [
{
"name": "breaking",
"changelogTitle": "💥 Breaking change",
"description": "Major change, breaking API",
"releaseType": "major",
"color": "#FF0000"
},
{
"name": "feat",
"changelogTitle": "🚀 Features",
"description": "A new feature",
"releaseType": "minor",
"color": "#00FF00"
},
{
"name": "fix",
"changelogTitle": "🐛 Bug Fixes",
"description": "A bug fix",
"releaseType": "patch",
"color": "#FFA500"
},
{
"name": "docs",
"changelogTitle": "📝 Documentation",
"description": "Documentation only changes",
"releaseType": "none",
"color": "#ADD8E6"
},
{
"name": "style",
"changelogTitle": "🎨 Styles",
"description": "Changes that do not affect the meaning of the code",
"releaseType": "none",
"color": "#FFC0CB"
},
{
"name": "refactor",
"changelogTitle": "🛠 Code Refactoring",
"description": "A code change that neither fixes a bug nor adds a feature",
"releaseType": "none",
"color": "#808080"
},
{
"name": "perf",
"changelogTitle": "🏎 Performance Improvements",
"description": "A code change that improves performance",
"releaseType": "patch",
"color": "#FFFF00"
},
{
"name": "test",
"changelogTitle": "🧪 Tests",
"description": "Adding missing tests or correcting existing tests",
"releaseType": "none",
"color": "#0000FF"
},
{
"name": "build",
"changelogTitle": "🚧 Builds",
"description": "Changes that affect the build system or external dependencies",
"releaseType": "none",
"color": "#800080"
},
{
"name": "ci",
"changelogTitle": "🔁 Continuous Integrations",
"description": "Changes to our CI configuration files and scripts",
"releaseType": "none",
"color": "#CBC3E3"
},
{
"name": "chore",
"changelogTitle": "🏠 Chores",
"description": "Other changes that don't modify src or test files",
"releaseType": "none",
"color": "#964B00"
},
{
"name": "revert",
"changelogTitle": "⏪ Reverts",
"description": "Reverts a previous commit",
"releaseType": "none",
"color": "#FFAE42"
}
]
}
18 changes: 18 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Auto labels

on:
workflow_dispatch:
push:
paths:
- ".autorc.json"

jobs:
create:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.0.2
- uses: auto-it/setup-auto@v1

- name: Create Labels
run: auto create-labels
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
workflow_dispatch:
pull_request:
workflow_run:
workflows: [CI]
types: [completed]
branches: [master]

concurrency: release

jobs:
publish:
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.0.2
with:
fetch-depth: 0

- uses: coursier/cache-action@v6.3.3
- uses: auto-it/setup-auto@v1

- name: Create Release
run: auto shipit
30 changes: 16 additions & 14 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@ name := "resy-booking-bot"

scalaVersion := "2.13.8"

lazy val root = project in file(".")

semanticdbEnabled := true

scalacOptions += "-Ywarn-unused"

ThisBuild / scalafixDependencies ++= Seq(
"com.github.vovapolu" %% "scaluzzi" % "0.1.23",
"org.scalatest" %% "autofix" % "3.1.0.1",
"com.eed3si9n.fix" %% "scalafix-noinfer" % "0.1.0-M1"
)

libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-ahc-ws" % "2.8.16",
"org.apache.logging.log4j" %% "log4j-api-scala" % "12.0",
"org.apache.logging.log4j" % "log4j-core" % "2.13.0" % Runtime,
"org.scalatest" %% "scalatest" % "3.2.12" % Test,
"org.mockito" % "mockito-core" % "4.6.1" % Test,
"org.slf4j" % "slf4j-nop" % "1.7.36" // Removes failed to load class warning
)
val root = Project("resy-booking-bot", file("."))
.settings(
semanticdbEnabled := true,
scalacOptions += "-Ywarn-unused",
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-ahc-ws" % "2.8.16",
"org.apache.logging.log4j" %% "log4j-api-scala" % "12.0",
"org.apache.logging.log4j" % "log4j-core" % "2.13.0" % Runtime,
"org.scalatest" %% "scalatest" % "3.2.12" % Test,
"org.mockito" % "mockito-core" % "4.6.1" % Test,
"org.slf4j" % "slf4j-nop" % "1.7.36"
// The above removes failed to load class warning
),
publish := {},
publishLocal := {}
)
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")

0 comments on commit 6dde3b4

Please sign in to comment.