Skip to content

⬆️ Update qodana to v2024.1.8 #15

⬆️ Update qodana to v2024.1.8

⬆️ Update qodana to v2024.1.8 #15

Workflow file for this run

name: 'Release'
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- name: Extract version from tag
id: extract_version
run: |
TAG_NAME=${GITHUB_REF##*/}
PATCH_VERSION=$(echo $TAG_NAME | sed -r 's/[^0-9]*([0-9]*)\.([0-9]*)\.([0-9]*)(-.*)?/\3/')
echo "PATCH_VERSION=${PATCH_VERSION}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 11
cache: gradle
- name: Run linters and test
run: ./gradlew clean :plugin:build :plugin:publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_TOKEN }} -PbuildNumber=${{ env.PATCH_VERSION }}
- name: Publish JAR to Space
run: |
cat <<EOF >> common/build.gradle.kts
publishing {
publications {
create<MavenPublication>("common") {
groupId = group.toString()
artifactId = "cli"
version = version.toString()
from(components["java"])
artifact(tasks["jarSources"])
pom {
url.set("https://github.com/JetBrains/qodana-action")
licenses {
license {
name.set("Apache-2.0")
url.set("https://github.com/JetBrains/qodana-action/blob/main/LICENSE")
}
}
}
}
}
repositories {
maven {
url = uri("https://packages.jetbrains.team/maven/p/sa/maven-public")
credentials {
username = System.getenv("JB_SPACE_INTELLIJ_CLIENT_ID")
password = System.getenv("JB_SPACE_INTELLIJ_CLIENT_SECRET")
}
}
}
}
EOF
./gradlew :common:publish
env:
JB_SPACE_INTELLIJ_CLIENT_ID: ${{ secrets.MAVEN_SPACE_USERNAME }}
JB_SPACE_INTELLIJ_CLIENT_SECRET: ${{ secrets.MAVEN_SPACE_PASSWORD }}
github:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
./changelog.sh > changelog.md
gh release create ${GITHUB_REF##*/} -F changelog.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
azure:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Node.js 16.x
uses: actions/setup-node@v4.0.2
with:
node-version: 16.x
- name: Install dependencies
run: cd vsts && npm install && cd QodanaScan && npm install && npm i -g tfx-cli
- name: Package and publish
run: |
cd vsts && npm run azure
mv JetBrains.qodana-*.vsix qodana.vsix
tfx extension publish --publisher JetBrains --vsix qodana.vsix -t $AZURE_TOKEN
env:
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}