-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (49 loc) · 1.55 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
56
57
58
59
name: Release
on:
push:
tags:
- 'v*' # Trigger the workflow on tag pushes that match the pattern 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
- name: Build JAR
run: mvn package
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
Release.txt
LICENSE
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: release-notes.txt
- name: Extract Tag Name
id: extract_tag_name
run: echo "TAG_NAME=$(echo "${{ github.ref }}" | cut -d '/' -f 3)" >> $GITHUB_ENV
- name: Upload JAR and Properties
id: upload-release-assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: |
./target/jmeter-har-import-plugin-local.jar
asset_name: |
jmeter-har-import-plugin-${{ env.TAG_NAME }}.jar
asset_content_type: application/java-archive