-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (42 loc) · 1.21 KB
/
release.yml
File metadata and controls
44 lines (42 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Upload Release Artifacts
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'zulu'
check-latest: true
- name: Setup ENV
run: echo "TAG=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build Jar with Gradle
id: publish_release_assets
run: ./gradlew buildAll -Pversion=${{ env.TAG }}
env:
BUILD_NUMBER: ${{ github.run_number }}
- name: Make Changelog
uses: FabricMC/fabric-action-scripts@v2
id: changelog
with:
context: changelog
workflow_id: release.yml
- name: Create release
id: create_release
uses: ncipollo/release-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref }}
name: Release ${{ env.TAG }}
body: ${{ steps.changelog.outputs.changelog }}
artifactErrorsFailBuild: true
artifacts: 'build/libs/**.jar'
generateReleaseNotes: true