42 lines
942 B
YAML
42 lines
942 B
YAML
|
name: Create release on tag push
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
tags:
|
||
|
- 'release/*'
|
||
|
|
||
|
jobs:
|
||
|
build:
|
||
|
name: Create release
|
||
|
runs-on: ubuntu-latest
|
||
|
permissions:
|
||
|
contents: write
|
||
|
|
||
|
steps:
|
||
|
- name: Checkout source code
|
||
|
uses: actions/checkout@v4
|
||
|
|
||
|
- name: Setup Gradle
|
||
|
uses: gradle/gradle-build-action@v3
|
||
|
|
||
|
- name: Run build with Gradle Wrapper
|
||
|
run: chmod +x ./gradlew && ./gradlew build
|
||
|
|
||
|
- name: Get release body
|
||
|
run: |
|
||
|
echo "release_body=$(cat CHANGELOG.md)" >> "$GITHUB_ENV"
|
||
|
|
||
|
- name: Setup Go
|
||
|
uses: actions/setup-go@v4
|
||
|
with:
|
||
|
go-version: '>=1.20.1'
|
||
|
|
||
|
- name: Draft release
|
||
|
uses: https://gitea.com/actions/release-action@main
|
||
|
with:
|
||
|
body: ${{ env.release_body }}
|
||
|
files: |-
|
||
|
build/libs/the_vault-tweaks-1.18.2-*.jar
|
||
|
draft: true
|
||
|
api_key: '${{ secrets.RELEASE_TOKEN }}'
|