Skip to content

Commit

Permalink
Vaffanculo merge
Browse files Browse the repository at this point in the history
  • Loading branch information
xFedeT authored May 4, 2024
1 parent 6e40527 commit 2f1fa18
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Create release

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlew-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradlew-
- name: Retrieve current version number before release
run: sh gradlew printVersion

- name: Create release tag
id: createRelease
run: |
sh gradlew shadowJar releaseVersion --no-commit
- name: Push new tag
run: |
git push origin --tags
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
version=v$(sh gradlew -q printVersion)
tag=$(git describe --tags --abbrev=0)
sh gradlew -q printChangeLog | gh release create $tag --latest -t "$version" -F - ${{ github.workspace }}/plugin/build/libs/*.jar ${{ github.workspace }}/api/build/libs/*.jar

0 comments on commit 2f1fa18

Please # to comment.