Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nothub committed May 6, 2024
1 parent 17f1dcd commit fdd8ec3
Showing 1 changed file with 15 additions and 30 deletions.
45 changes: 15 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,25 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Git
uses: actions/checkout@v3

- name: Java
uses: actions/[email protected]
- name: Checkout changes
uses: actions/checkout@v4
with:
distribution: 'adopt'
java-version: '8'
fetch-depth: 0

- name: Cache
uses: actions/[email protected]
- name: Setup Java
uses: actions/setup-java@v4
with:
path: ~/.m2
key: '${{ runner.os }}-m2-${{ hashFiles(''**/pom.xml'') }}'
restore-keys: '${{ runner.os }}-m2'
java-version: '17'
distribution: 'temurin'
check-latest: true
cache: 'gradle'

- name: Package
- name: Build jar
run: mvn --batch-mode --show-version --errors package --file pom.xml

- name: Draft
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: 'automated release at commit ${{ github.sha }}'
draft: false
prerelease: false

- name: Release
uses: csexton/release-asset-action@v2
- name: Publish release
uses: softprops/action-gh-release@v2
with:
pattern: "target/AntiIllegals-*.jar"
github-token: ${{ secrets.GITHUB_TOKEN }}
release-url: ${{ steps.create_release.outputs.upload_url }}
name: '${{ github.ref_name }}'
body: 'Release generated at commit: ${{ github.sha }}'
files: 'target/*.jar'

0 comments on commit fdd8ec3

Please sign in to comment.