Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Start using sbt-ci-release for publishing to Maven Central #189

Closed
wants to merge 1 commit into from
Closed
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
153 changes: 0 additions & 153 deletions .circleci/config.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
template: |
# What's Changed
$CHANGES
categories:
- title: 'Breaking'
label: 'type: breaking'
- title: 'New'
label: 'type: feature'
- title: 'Bug Fixes'
label: 'type: bug'
- title: 'Maintenance'
label: 'type: maintenance'
- title: 'Documentation'
label: 'type: docs'
- title: 'Dependency Updates'
label: 'type: dependencies'

version-resolver:
major:
labels:
- 'type: breaking'
minor:
labels:
- 'type: feature'
patch:
labels:
- 'type: bug'
- 'type: maintenance'
- 'type: docs'
- 'type: dependencies'
- 'type: security'

exclude-labels:
- 'skip-changelog'
12 changes: 12 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"automerge": true,
"labels": ["type: dependencies"],
"packageRules": [
{
"matchManagers": [
"sbt"
],
"enabled": false
}
]
}
13 changes: 13 additions & 0 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Auto approve

on:
pull_request_target

jobs:
auto-approve:
runs-on: ubuntu-20.04
steps:
- uses: hmarr/[email protected]
if: github.actor == 'scala-steward' || github.actor == 'renovate[bot]'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI
on:
pull_request:
jobs:
ciJvms:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
java: [ '1.8', '11', '17' ]
steps:
- uses: actions/[email protected]
with:
fetch-depth: 100
- name: Fetch tags
run: git fetch --depth=100 origin +refs/tags/*:refs/tags/*
- uses: olafurpg/setup-scala@v13
with:
java-version: ${{ matrix.java }}
- name: Coursier cache
uses: coursier/cache-action@v6
- name: sbt ci ${{ github.ref }}
run: ./sbt ci
- name: Formatting
run: sbt scalafmtSbtCheck scalafmtCheckAll
- name: Test
run: sbt +test
- name: publishLocal
run: sbt +publishLocal
ci:
runs-on: ubuntu-20.04
needs: [ ciJvms ]
steps:
- name: Aggregate of lint, and all tests
run: echo "ci passed"
14 changes: 14 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Release Drafter

on:
push:
branches:
- master

jobs:
update_release_draft:
runs-on: ubuntu-20.04
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release
on:
push:
branches: [ master ]
release:
types: [ published ]
jobs:
release:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v13
with:
java-version: [email protected]
- name: Coursier cache
uses: coursier/cache-action@v6
- name: sbt ci-release ${{ github.ref }}
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 }}
Comment on lines +22 to +25
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will now need to add these secrets to GitHub -- I obviously can't have them.
You will find a helpful howto guide how to go about it at https://github.com/sbt/sbt-ci-release#gpg

31 changes: 22 additions & 9 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
pull_request_rules:

- name: label scala-steward's PRs
conditions:
- author=scala-steward
actions:
label:
add: ["type: dependencies"]

- name: label ovo-scala-steward's failed PRs
conditions:
- author=scala-steward
- status-failure~=ci/circleci
- status-failure=ci
actions:
label:
add:
Expand All @@ -13,7 +20,7 @@ pull_request_rules:
- name: label scala-steward's major version PRs
conditions:
- author=scala-steward
- body~=labels:.*semver-major
- body~=labels:.*early-semver-major
actions:
label:
add:
Expand All @@ -23,9 +30,8 @@ pull_request_rules:
- name: automatically merge scala-steward's minor version PRs
conditions:
- author=scala-steward
- "status-success=ci/circleci: build"
- "status-success=ci/circleci: unit_test"
- body~=labels:.*semver-minor
- "status-success=ci"
- body~=labels:.*early-semver-minor
actions:
review:
type: APPROVE
Expand All @@ -44,9 +50,8 @@ pull_request_rules:
- name: automatically merge scala-steward's patch version PRs
conditions:
- author=ovo-scala-steward
- "status-success=ci/circleci: build"
- "status-success=ci/circleci: unit_test"
- body~=labels:.*semver-patch
- "status-success=ci"
- body~=labels:.*early-semver-patch
actions:
review:
type: APPROVE
Expand All @@ -60,4 +65,12 @@ pull_request_rules:
- patch-update
remove:
- failed-update
delete_head_branch: {}
delete_head_branch: {}

- name: automatic update for dependency update PRs
conditions:
- -conflict # skip PRs with conflicts
- -draft # filter-out GH draft PRs
- "label=type: dependencies"
actions:
update: {}
6 changes: 3 additions & 3 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version = 2.7.5

version = "3.1.2"
runner.dialect = scala213
style = default
align = none
align.preset = none
maxColumn = 100
project.git = true
Loading