Skip to content

Commit

Permalink
Set version at publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe '116' Loiseau committed Apr 24, 2024
1 parent 982468a commit 9a7006f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ jobs:

- name: "Gradle: Publish"
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/sovity/') }}
run: ./gradlew check publishAllPublicationsToGitHubPackagesRepository ${{ env.GRADLE_ARGS }}
run: |
if [[ "$GITHUB_REF" == "refs/tags/v"* ]]; then
GRADLE_ARGS="-Pversion=${GITHUB_REF#refs/tags/v}"
else if [[ "$GITHUB_REF" == "refs/heads/sovity/"* ]]; then
GRADLE_ARGS="-Pversion=${GITHUB_REF#refs/heads/sovity/}.0.$(date '+%Y%m%d.%H%M%S')"
fi
./gradlew "$GRADLE_ARGS" check publishAllPublicationsToGitHubPackagesRepository
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=org.eclipse.edc
version=0.2.1.2
version=0.2.1-SNAPSHOT
# for now, we're using the same version for the autodoc plugin, the processor and the runtime-metamodel lib, but that could
# change in the future
annotationProcessorVersion=0.2.1-SNAPSHOT
Expand Down

0 comments on commit 9a7006f

Please sign in to comment.