-
Notifications
You must be signed in to change notification settings - Fork 40
55 lines (54 loc) · 1.7 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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 build publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_TOKEN }} -PbuildNumber=${{ env.PATCH_VERSION }}
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 12.x
uses: actions/setup-node@v4.0.2
with:
node-version: 12.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 }}