-
Notifications
You must be signed in to change notification settings - Fork 160
44 lines (36 loc) · 1.1 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
name: Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build info
id: build_info
run: |
BUILD_TAG=${GITHUB_REF#refs/tags/}
cat ./CHANGELOG.md | grep "$BUILD_TAG" | sed 's%^\*[[:space:]]*\*\*[0-9.]*\*\*[[:space:]]*%%g' > ${{ github.workspace }}-CHANGELOG.txt
echo "build_tag=${BUILD_TAG}" >> $GITHUB_OUTPUT
- name: Set up Java 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: liberica
- name: Build
run: ./gradlew build buildPlugin
- name: Release
uses: softprops/action-gh-release@v2
with:
body_path: ${{ github.workspace }}-CHANGELOG.txt
fail_on_unmatched_files: true
draft: false
prerelease: false
files:
build/distributions/checkstyle-idea-${{ steps.build_info.outputs.build_tag }}.zip
- name: Publish to Jetbrains Plugin Repo
run: ./gradlew publishPlugin
env:
JETBRAINS_PLUGIN_REPO_TOKEN: ${{ secrets.JETBRAINS_PLUGIN_REPO_TOKEN }}