-
Notifications
You must be signed in to change notification settings - Fork 22
52 lines (52 loc) · 2.02 KB
/
Copy pathrelease.yml
File metadata and controls
52 lines (52 loc) · 2.02 KB
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
name: Generate changelog and plugin archive for new release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'temurin'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: >
./gradlew buildPlugin
-Pgpr.username=${{ github.actor }}
-Pgpr.token=${{ secrets.GITHUB_TOKEN }}
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Simple conventional changelog
uses: redhat-developer/simple-conventional-changelog@0a6db1ac3910c2cf66f2e1a530951dba1ece8540 #0.0.12
id: changelog
with:
token: ${{ secrets.GITHUB_TOKEN }}
current-tag: ${{ steps.get_version.outputs.VERSION }}
types-mapping: 'feat:Features,fix:Bug Fixes,docs:Documentation,refactor:Refactoring,build:Builds,chore:Other'
scopes-mapping: 'UI:UI,Hub:Hub'
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: ${{ steps.get_version.outputs.VERSION }}
body: ${{ steps.changelog.outputs.changelog }}
- name: Attach zip to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: '${{ github.workspace }}/build/distributions/intellij-dependency-analytics-${{ steps.get_version.outputs.VERSION }}.zip'
asset_name: 'Dependency-Analytics-${{ steps.get_version.outputs.VERSION }}.zip'
asset_content_type: application/zip