From 677f1221c8dead789a7e6d37c1ea1e637392cfac Mon Sep 17 00:00:00 2001 From: Matthias Eggert Date: Thu, 15 Feb 2024 16:05:17 +0100 Subject: [PATCH] Update release workflow and add plugin.properties Update release workflow to trigger on tag pushes matching 'v*' pattern Update release.yml to remove plugin.properties from asset_path Update release.yml to set release notes as environment variable Update release notes environment variable in release workflow --- .github/workflows/release.yml | 33 +++++++++++++++++++++------------ plugin.properties | 8 ++++++++ 2 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 plugin.properties diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e57f6dc..46c5c8c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,9 @@ name: Release on: - push: - tags: - - 'v*' # Trigger the workflow on tag pushes that match the pattern 'v*' + push: + tags: + - 'v*' # Trigger the workflow on tag pushes that match the pattern 'v*' jobs: release: @@ -22,9 +22,11 @@ jobs: - name: Build JAR run: mvn package - - name: Read Release Notes - id: release_notes - run: echo "::set-output name=notes::$(cat release-notes.txt)" + - name: Read and Sanitize Release Notes + run: | + RELEASE_NOTES=$(<./release-notes.txt) + RELEASE_NOTES_SANITIZED=$(echo "$RELEASE_NOTES" | sed "s/'/\\'/g") + echo "RELEASE_NOTES=$RELEASE_NOTES_SANITIZED" >> $GITHUB_ENV - name: Create Release id: create_release @@ -34,15 +36,22 @@ jobs: with: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} - body: ${{ steps.release_notes.outputs.notes }} - - - name: Upload JAR - id: upload-release-asset + body: ${{ env.RELEASE_NOTES }} + + - 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-${{ github.ref }}.jar + 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 + diff --git a/plugin.properties b/plugin.properties new file mode 100644 index 0000000..5e1c60f --- /dev/null +++ b/plugin.properties @@ -0,0 +1,8 @@ +# Plugin metadata +name=JMeter HAR Importer Plugin +version=0.1.0 +author=Matthias +description=This plugin allows importing HTTP Archive (HAR) files into JMeter. + +# Plugin components +class=de.qytera.jmeterharimporter.HARImporter