Merge pull request #12 from FairportRobotics/tyler-versioning

New versioning scheme
This commit is contained in:
Tyler Wilcox 2024-01-10 16:40:00 -05:00 committed by GitHub
commit 4869d2be10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 11 deletions

View File

@ -17,7 +17,7 @@ jobs:
build:
runs-on: ubuntu-latest
container: wpilib/roborio-cross-ubuntu:2022-18.04
container: wpilib/roborio-cross-ubuntu:2024-22.04
permissions:
contents: read
packages: write
@ -42,7 +42,7 @@ jobs:
- name: Publish to GitHub Packages
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
with:
arguments: publish
arguments: -Prelease publish
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -57,16 +57,20 @@ task cleanReleaseRepo(type: Delete) {
tasks.matching {it != cleanReleaseRepo}.all {it.dependsOn cleanReleaseRepo}
model {
publishing {
task sourceJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = "sources"
}
publishing {
publications {
java(MavenPublication) {
maven(MavenPublication) {
artifact sourceJar
artifactId = "${baseArtifactId}-java"
groupId artifactGroupId
version pubVersion
version = project.hasProperty('release') ? pubVersion : pubVersion + "-SNAPSHOT"
from components.java
}
}
}
}