Skip to content

Release v2.2.0

Release v2.2.0 #3

Workflow file for this run

name: Patch
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
if: "!startsWith(github.event.head_commit.message, 'Release v') && github.event.base_ref != 'refs/heads/main'"
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Delete original tag
run: |
git tag -d ${{ github.ref_name }}
git push origin :refs/tags/${{ github.ref_name }}
- name: Change Maven version to release version
run: mvn --batch-mode versions:set -DgenerateBackupPoms=false -DnewVersion=${{ env.GITHUB_MAJOR_VERSION }}.${{ env.GITHUB_MINOR_VERSION }}.${{ env.GITHUB_PATCH_VERSION }}
- name: Commit and tag release version
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b ${{ github.event.base_ref }}
git add .
git commit -m "Release ${{ github.ref_name }}"
git tag ${{ github.ref_name }}
- name: Build with Maven
run: mvn --batch-mode -Pjacoco verify
- name: Run SonarCloud analysis
run: >
mvn --batch-mode -DskipTests sonar:sonar
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=gridsuite
-Dsonar.projectKey=gridsuite_spreadsheet-config-server
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Build Docker image
run: >
mvn --batch-mode deploy -DskipTests -Dmaven.install.skip -Dmaven.deploy.skip -Dpowsybl.docker.deploy
-Djib.httpTimeout=60000
-Djib.to.image=docker.io/gridsuite/spreadsheet-config-server:${GITHUB_REF_NAME#v}
-Djib.to.auth.username=gridsuiteci
-Djib.to.auth.password=${{ secrets.DOCKERHUB_TOKEN }}