🧱 Update azure-pipelines.yml #16
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: '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: ./gradlew :plugin:publish -PbuildNumber=${{ env.PATCH_VERSION }} | |
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/[email protected] | |
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 }} |