Skip to content

Commit

Permalink
Merge pull request #12 from FairportRobotics/tyler-versioning
Browse files Browse the repository at this point in the history
New versioning scheme
  • Loading branch information
tywilly authored Jan 10, 2024
2 parents 95185d2 + 2714f9f commit 4869d2b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
22 changes: 13 additions & 9 deletions lib/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,20 @@ task cleanReleaseRepo(type: Delete) {

tasks.matching {it != cleanReleaseRepo}.all {it.dependsOn cleanReleaseRepo}

model {
publishing {
publications {
java(MavenPublication) {
artifactId = "${baseArtifactId}-java"
groupId artifactGroupId
version pubVersion
task sourceJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = "sources"
}

from components.java
}
publishing {
publications {
maven(MavenPublication) {
artifact sourceJar
artifactId = "${baseArtifactId}-java"
groupId artifactGroupId
version = project.hasProperty('release') ? pubVersion : pubVersion + "-SNAPSHOT"

from components.java
}
}
}

0 comments on commit 4869d2b

Please sign in to comment.