Skip to content

Commit

Permalink
Merge pull request #76 from eed3si9n/wip/release
Browse files Browse the repository at this point in the history
Automate the release
  • Loading branch information
eed3si9n authored Jul 27, 2024
2 parents 7d5660e + 4975655 commit aeec5dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
branches: ['**']
push:
branches: ['**']
tags: [v*]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -75,7 +76,7 @@ jobs:
publish:
name: Publish Artifacts
needs: [build]
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main')
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
strategy:
matrix:
os: [ubuntu-latest]
Expand Down Expand Up @@ -122,4 +123,4 @@ jobs:
rm targets.tar
- name: Publish project
run: sbt +publish
run: sbt ci-release
9 changes: 9 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,12 @@ ThisBuild / scmInfo := Some(
)
ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-latest", "windows-latest")
ThisBuild / githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "scripted")))
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches :=
Seq(RefPredicate.StartsWith(Ref.Tag("v")))
ThisBuild / githubWorkflowPublish := Seq(
WorkflowStep.Sbt(
commands = List("ci-release"),
name = Some("Publish project"),
)
)

0 comments on commit aeec5dc

Please sign in to comment.