Skip to content

Commit

Permalink
✨ Update publishing config +semver:minor (#69)
Browse files Browse the repository at this point in the history
* ✨ Update publishing config

* 🚀 Create release-drafter.yaml

* 🚀 Create PULL_REQUEST_TEMPLATE.md

* 👷 Adding release drafter workflow

* 👷 Updating publish workflow

* Update build.gradle
  • Loading branch information
jossmoff authored Aug 15, 2024
1 parent 14f740b commit fb4d869
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 19 deletions.
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

Please tick options that are relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
31 changes: 31 additions & 0 deletions .github/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'dependencies'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes
$CHANGES
10 changes: 0 additions & 10 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ jobs:
distribution: temurin
java-version: 11

- name: Set up Test Environment
run: |
pip install localstack awscli-local
docker pull localstack/localstack
- name: Test
run: ./gradlew test
env:
OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}

- name: Publish
run: ./gradlew build publish --no-parallel
env:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release Drafter

on:
push:
branches:
- main

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 12 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
plugins {
id 'scala'
id 'jacoco'
id 'com.diffplug.spotless' version '6.20.0'
id 'maven-publish'
id 'signing'
id 'com.palantir.git-version' version '3.0.0'
id 'io.github.gradle-nexus.publish-plugin' version "1.3.0"
id "com.avast.gradle.docker-compose" version "0.17.4"
id 'com.diffplug.spotless' version '6.20.0'
}

group = 'dev.joss'
version = '1.5.0'
version = gitVersion()

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
Expand Down Expand Up @@ -121,14 +123,15 @@ publishing {
}
}
}
}

nexusPublishing {
repositories {
maven {
name = "OSSRH"
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = project.findProperty("sonatypeUsername")
password = project.findProperty("sonatypePassword")
}
sonatype {
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
username = project.findProperty("sonatypeUsername")
password = project.findProperty("sonatypePassword")
}
}
}
Expand Down

0 comments on commit fb4d869

Please sign in to comment.