Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ detect sbt ci-release packaging workflows #4135

Merged
merged 2 commits into from
Jun 1, 2024
Merged
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
9 changes: 9 additions & 0 deletions checks/fileparser/github_workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,15 @@ func IsPackagingWorkflow(workflow *actionlint.Workflow, fp string) (JobMatchResu
},
LogText: "candidate java publishing workflow using gradle",
},
{
// Scala packages with sbt-ci-release
Steps: []*JobMatcherStep{
{
Run: "sbt.*ci-release",
},
},
LogText: "candidate Scala publishing workflow using sbt-ci-release",
},
{
// Ruby packages.
Steps: []*JobMatcherStep{
Expand Down
5 changes: 5 additions & 0 deletions checks/fileparser/github_workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,11 @@ func TestIsPackagingWorkflow(t *testing.T) {
filename: "../testdata/.github/workflows/github-workflow-packaging-gradle.yaml",
expected: true,
},
{
name: "sbt ci-release",
filename: "../testdata/.github/workflows/github-workflow-packaging-sbt-ci-release.yaml",
expected: true,
},
{
name: "gem publish",
filename: "../testdata/.github/workflows/github-workflow-packaging-gem.yaml",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release
on:
push:
branches: [master, main]
tags: ["*"]
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v10
- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
Loading