Skip to content

Commit d3f439a

Browse files
committed
Switch to tag-based releases
1 parent 2fada23 commit d3f439a

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
name: Release
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
prerelease:
7-
description: 'Pre-release'
8-
required: false
9-
type: boolean
10-
default: false
4+
push:
5+
tags:
6+
- 'v*'
117

128
jobs:
139
release:
@@ -17,12 +13,9 @@ jobs:
1713
steps:
1814
- uses: actions/checkout@v4
1915

20-
- name: Get version from gradle.properties
16+
- name: Get version from tag
2117
id: version
22-
run: |
23-
MC_VERSION=$(grep '^mc_version=' gradle.properties | cut -d'=' -f2)
24-
MOD_VERSION=$(grep '^mod_version=' gradle.properties | cut -d'=' -f2)
25-
echo "VERSION=${MC_VERSION}-${MOD_VERSION}" >> $GITHUB_OUTPUT
18+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
2619

2720
- name: Set up JDK 17
2821
uses: actions/setup-java@v4
@@ -39,8 +32,6 @@ jobs:
3932
- name: Create Release
4033
uses: softprops/action-gh-release@v2
4134
with:
42-
tag_name: v${{ steps.version.outputs.VERSION }}
4335
name: ${{ steps.version.outputs.VERSION }}
4436
files: build/libs/*.jar
45-
prerelease: ${{ inputs.prerelease }}
4637
generate_release_notes: true

0 commit comments

Comments
 (0)