Skip to content

Commit

Permalink
Fix snapshot date
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed May 18, 2022
1 parent 5bffb33 commit 7a77080
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/main.yaml
Expand Up @@ -55,7 +55,10 @@ jobs:
if: "!startsWith(github.ref, 'refs/tags/') && steps.no-tag.outputs.nb == 0"
- run: sed --in-place 's/version = .*/version = "${{ steps.last-tag.outputs.tag }}+${{ steps.no-tag.outputs.nb }}"/g' build.gradle
if: "!startsWith(github.ref, 'refs/tags/') && steps.no-tag.outputs.nb > 0"
- run: sed --in-place 's/version = .*/version = "0.$(date +%Y%m%d.%H%M%S).SNAPSHOT"/g' build.gradle
- id: date
run: echo echo "##[set-output name=date;]$(date +%Y%m%d.%H%M%S)"
if: "github.ref == 'refs/heads/master'"
- run: sed --in-place 's/version = .*/version = "0.${{ steps.date.outputs.date }}.SNAPSHOT"/g' build.gradle
if: "github.ref == 'refs/heads/master'"

- run: echo "enablePublishing=true" > gradle.properties
Expand Down

0 comments on commit 7a77080

Please sign in to comment.