Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

name: Continuous Integration

on:
on:
pull_request:
branches: ['**', '!update/**', '!pr/**']
push:
Expand All @@ -31,7 +31,6 @@ permissions:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


concurrency:
group: ${{ github.workflow }} @ ${{ github.ref }}
cancel-in-progress: true
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@

name: Clean

on: push
on:
push:

jobs:
delete-artifacts:
name: Delete Artifacts
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions ci/src/main/scala/org/typelevel/sbt/TypelevelCiPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ object TypelevelCiPlugin extends AutoPlugin {
val dependencySubmission =
if (tlCiDependencyGraphJob.value)
List(
WorkflowJob(
WorkflowJob.Run(
"dependency-submission",
"Submit Dependencies",
scalas = Nil,
Expand All @@ -173,7 +173,7 @@ object TypelevelCiPlugin extends AutoPlugin {
Some(file(".scala-steward.conf")).filter(_.exists()),
githubWorkflowAddedJobs ++= {
tlCiStewardValidateConfig.value.toList.map { config =>
WorkflowJob(
WorkflowJob.Run(
"validate-steward",
"Validate Steward Config",
WorkflowStep.Checkout ::
Expand Down
59 changes: 0 additions & 59 deletions github-actions/src/main/resources/clean.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,24 @@ package org.typelevel.sbt.gha

sealed abstract class Concurrency {
def group: String
def cancelInProgress: Option[Boolean]
def cancelInProgress: Option[String]
}

object Concurrency {
def apply(group: String): Concurrency =
Impl(group, None)

def apply(group: String, cancelInProgress: Option[Boolean] = None): Concurrency =
def apply(group: String, cancelInProgress: Boolean): Concurrency =
apply(group, Some(cancelInProgress))

def apply(group: String, cancelInProgress: Option[Boolean]): Concurrency =
Impl(group, cancelInProgress.map(_.toString))

def apply(group: String, cancelInProgress: Option[String])(
implicit dummy: DummyImplicit): Concurrency =
Impl(group, cancelInProgress)

private final case class Impl(group: String, cancelInProgress: Option[Boolean])
private final case class Impl(group: String, cancelInProgress: Option[String])
extends Concurrency {
override def productPrefix = "Concurrency"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ trait GenerativeKeys {
lazy val githubWorkflowCheck = taskKey[Unit](
"Checks to see if the ci.yml and clean.yml files are equivalent to what would be generated and errors if otherwise")

lazy val githubWorkflows = settingKey[Map[String, Workflow]](
"The map of jobs which will make up the generated workflows, with the keys being the workflow file path.")
lazy val githubWorkflowCI =
settingKey[Workflow]("The Workflow which will make up the generated ci workflow (ci.yml)")
lazy val githubWorkflowGeneratedCI = settingKey[Seq[WorkflowJob]](
"The sequence of jobs which will make up the generated ci workflow (ci.yml)")
lazy val githubWorkflowGeneratedUploadSteps = settingKey[Seq[WorkflowStep]](
Expand Down Expand Up @@ -65,13 +69,17 @@ trait GenerativeKeys {
s"Commands automatically prepended to a WorkflowStep.Sbt (default: ['++ $${{ matrix.scala }}'])")
lazy val githubWorkflowBuild = settingKey[Seq[WorkflowStep]](
"A sequence of workflow steps which compile and test the project (default: [Sbt(List(\"test\"))])")
lazy val githubWorkflowBuildJob =
settingKey[WorkflowJob]("A workflow job for compiling and testing the project")

lazy val githubWorkflowPublishPreamble = settingKey[Seq[WorkflowStep]](
"A list of steps to insert after base setup but before publishing (default: [])")
lazy val githubWorkflowPublishPostamble = settingKey[Seq[WorkflowStep]](
"A list of steps to insert after publication but before the end of the publish job (default: [])")
lazy val githubWorkflowPublish = settingKey[Seq[WorkflowStep]](
"A sequence workflow steps which publishes the project (default: [Sbt(List(\"+publish\"))])")
lazy val githubWorkflowPublishJob =
settingKey[WorkflowJob]("A workflow job which publishes the project.")
lazy val githubWorkflowPublishTargetBranches = settingKey[Seq[RefPredicate]](
"A set of branch predicates which will be applied to determine whether the current branch gets a publication stage; if empty, publish will be skipped entirely (default: [== main])")
lazy val githubWorkflowPublishCond = settingKey[Option[String]](
Expand Down
Loading
Loading