8.18.0.70939 #37
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: sonar-release | |
# This workflow is triggered when publishing a new github release | |
on: | |
release: | |
types: | |
- published | |
env: | |
PYTHONUNBUFFERED: 1 | |
jobs: | |
sonar_release: | |
runs-on: ubuntu-latest | |
name: Start release process | |
steps: | |
- name: SL release | |
id: sl_release | |
with: | |
publish_to_binaries: false | |
slack_channel: team-sonarlint-java | |
env: | |
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} | |
BURGRX_USER: ${{ secrets.BURGRX_USER }} | |
BURGRX_PASSWORD: ${{ secrets.BURGRX_PASSWORD }} | |
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} | |
SLACK_API_TOKEN: ${{secrets.SLACK_API_TOKEN }} | |
# Put your action repo here | |
uses: SonarSource/gh-action_release/main@v4 | |
- name: Check outputs | |
if: always() | |
run: | | |
echo "${{ steps.sl_release.outputs.releasability }}" | |
echo "${{ steps.sl_release.outputs.release }}" | |
maven-central-sync: | |
runs-on: ubuntu-latest | |
needs: | |
- sonar_release | |
steps: | |
- name: Setup JFrog CLI | |
uses: jfrog/setup-jfrog-cli@v1 | |
- name: JFrog config | |
run: jfrog rt config repox --url https://repox.jfrog.io/artifactory/ --apikey $ARTIFACTORY_API_KEY --basic-auth-only | |
env: | |
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} | |
- name: Get the version | |
id: get_version | |
run: | | |
IFS=. read major minor patch build <<< "${{ github.event.release.tag_name }}" | |
echo "build=${build}" >> "$GITHUB_OUTPUT" | |
- name: Create local repository directory | |
id: local_repo | |
run: echo "dir=$(mktemp -d repo.XXXXXXXX)" >> "$GITHUB_OUTPUT" | |
- name: Download Artifacts | |
uses: SonarSource/gh-action_release/download-build@v4 | |
with: | |
build-number: ${{ steps.get_version.outputs.build }} | |
local-repo-dir: ${{ steps.local_repo.outputs.dir }} | |
- name: Maven Central Sync | |
id: maven-central-sync | |
continue-on-error: true | |
uses: SonarSource/gh-action_release/maven-central-sync@v4 | |
with: | |
local-repo-dir: ${{ steps.local_repo.outputs.dir }} | |
env: | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
- name: Notify on failure | |
if: ${{ failure() || steps.maven-central-sync.outcome == 'failure' }} | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: failure | |
fields: repo,author,eventName | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_BUILD_WEBHOOK }} |