Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v3
with:
repository: WISE-Developers/versions
repository: WISE-Developers/WISE_Versions
path: versions
token: ${{ secrets.WISE_PAT }}
- name: Set up JDK 8
Expand All @@ -30,8 +32,8 @@ jobs:
shell: pwsh
run: |
$versions = ConvertFrom-StringData (Get-Content versions/versions.properties -raw)
echo "Updating to version $($versions.prometheus)"
echo "prometheus_version=$($versions.prometheus)" >> $env:GITHUB_OUTPUT
echo "Updating to version $($versions.wise)"
echo "prometheus_version=$($versions.wise)" >> $env:GITHUB_OUTPUT

- name: Update the version
run: mvn versions:set -DnewVersion=${{ steps.version-numbers.outputs.prometheus_version }}
Expand All @@ -49,6 +51,8 @@ jobs:
run: |
git config user.name github-actions
git config user.email [email protected]
LAST_TAG=$(git describe --abbrev=0 --tags)
echo "last_tag=$LAST_TAG" >> $GITHUB_OUTPUT
git tag -a ${{ steps.version-numbers.outputs.prometheus_version }} -m "Release on $(date +'%Y-%m-%d') for commit $(git rev-parse HEAD)"

- name: Push changes
Expand All @@ -63,7 +67,7 @@ jobs:
owner: WISE-Developers
repo: WISE_Java_API
toTag: ${{ steps.version-numbers.outputs.prometheus_version }}
# fromTag: ${{ steps.last-tags.outputs.last_tag }}
fromTag: ${{ steps.last-tags.outputs.last_tag }}
env:
GITHUB_TOKEN: ${{ secrets.WISE_PAT }}

Expand Down