Skip to content

Commit

Permalink
add a GH workflow for releasing jars
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom committed Feb 23, 2023
1 parent b3694d3 commit b20c505
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release Jar

on:
push:
tags:
- '*'

jobs:
tests:
runs-on: 'ubuntu-latest'

steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
cache: maven
- name: Set version
id: version
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- run: mvn clean package
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload Jar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: target/jmeter-prometheus-plugin-${{ steps.version.outputs.version }}.jar
asset_name: jmeter-prometheus-plugin-${{ steps.version.outputs.version }}.jar
asset_content_type: application/java-archive


0 comments on commit b20c505

Please sign in to comment.