Skip to content

Update Gaffer Version #10

Update Gaffer Version

Update Gaffer Version #10

name: Update Gaffer Version
on:
milestone:
types:
- closed
env:
GH_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
jobs:
update-gaffer-version:
runs-on: ubuntu-latest
env:
VERSION_UPDATE_BRANCH: updating-gaffer-version-${{ github.event.milestone.title }}
steps:
- name: Checkout base branch
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'
- name: Update Gaffer Version
run: |
newVersion=${{ github.event.milestone.title }}
bash update-versions.sh "${newVersion}"
- name: Update gafferpy
run: |
newVersion=${{ github.event.milestone.title }}
curl -o spring-rest.jar https://repo.maven.apache.org/maven2/uk/gov/gchq/gaffer/spring-rest/$newVersion/spring-rest-$newVersion-exec.jar
java -Dgaffer.schemas=tests/road-traffic-example/schema -Dgaffer.storeProperties=tests/road-traffic-example/federatedStore.properties -Dgaffer.graph.config=tests/road-traffic-example/federatedGraphConfig.json -jar spring-rest.jar &
sleep 1m
python src/generate.py
rm spring-rest.jar
- name: Set up Github credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Create PR branch
env:
VERSION_UPDATE_BRANCH: updating-to-gaffer-version-${{ github.event.milestone.title }}
run: |
git checkout -b ${{ env.VERSION_UPDATE_BRANCH }}
git commit -am "Updated Gaffer version to ${{ github.event.milestone.title }}"
git push --set-upstream origin ${{ env.VERSION_UPDATE_BRANCH }}
- name: Tag release branch
run: |
git tag gafferpy-${{ github.event.milestone.title }}
git push origin gafferpy-${{ github.event.milestone.title }}
git push
- name: Submit PR
env:
ISSUE_ID: ${{ steps.create-issue.outputs.ISSUE_ID }}
run: |-
gh pr create --title "Updated Gaffer version to ${{ github.event.milestone.title }}" --body ""