-
Notifications
You must be signed in to change notification settings - Fork 27
50 lines (49 loc) · 2.13 KB
/
post-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
name: 'post-release'
on:
release:
types: [released]
jobs:
github-actions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: github.event.release.name != 'nightly'
with:
repository: 'jetbrains/qodana-action'
token: ${{ secrets.GH_PAT }}
fetch-depth: 0
- name: Upgrade and send PR
if: github.event.release.name != 'nightly'
run: |
cd common && node update-cli.js && cd ..
npm ci
npm run build && npm run -w scan package && npm run -w vsts package
git config user.name qodana-bot
git config user.email qodana-support@jetbrains.com
git checkout -b next
git add .
git commit -m ":arrow_up: Update \`qodana\` to \`${{ github.event.release.name }}\`"
git push origin next --force
gh pr create --repo jetbrains/qodana-action --base main --head next --title ":arrow_up: Update \`qodana\` to the \`${{ github.event.release.name }}\`" --body "This automated PR updates \`qodana\` to the latest version. Please review and merge it if everything is fine."
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
winget:
runs-on: ubuntu-latest
if: github.event.release.name != 'nightly'
steps:
- run: >
set -e &&
echo "${SHA256} $(pwd)/komac.jar" > shasum &&
curl -fSsL https://github.com/russellbanks/Komac/releases/download/v1.6.0/Komac-1.6.0-all.jar -o komac.jar &&
sha256sum --check --status shasum
env:
SHA256: f9dae7452a89efa6fb8ceda1a3042d9b13b8d75005cfbb0bd8af1f3349fce726
- run: |
export VERSION=${{ github.event.release.name }}
$JAVA_HOME_17_X64/bin/java -jar komac.jar update \
--id 'JetBrains.QodanaCLI' \
--version $(echo "$VERSION" | sed 's/^v//') \
--urls "https://github.com/JetBrains/qodana-cli/releases/download/$VERSION/qodana_windows_arm64.zip,https://github.com/JetBrains/qodana-cli/releases/download/$VERSION/qodana_windows_x86_64.zip" \
--submit
env:
GITHUB_TOKEN: ${{ secrets.WINGET_GH_PAT_TOKEN }}