Skip to content

Commit

Permalink
Fix tag naming
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Nov 27, 2023
1 parent 9a8e9c9 commit ae4bacf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/export_guide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

# Attach the guide as a release artifact if we're building a tag which might be a release
attach-release-artifact:
if: startsWith(github.ref, 'refs/tags/fabric/v') || startsWith(github.ref, 'refs/tags/forge/v')
if: startsWith(github.ref, 'refs/tags/fabric/v') || startsWith(github.ref, 'refs/tags/neoforge/v')
needs: build
name: Attach Release Artifact
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,11 @@ if (ext.branch) {

ext.tag = System.getenv('TAG') ?: ""
if (ext.tag) {
if (!ext.tag.startsWith("forge/v")) {
throw new GradleException("Tags for the forge version should start with forge/: ${ext.tag}")
if (!ext.tag.startsWith("neoforge/v")) {
throw new GradleException("Tags for the neoforge version should start with neoforge/: ${ext.tag}")
}

version = ext.tag.substring("forge/v".length())
version = ext.tag.substring("neoforge/v".length())
// Validate that the rest is a semver version
if (version ==~ /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/) {
if (System.getenv("GITHUB_ENV")) {
Expand Down

0 comments on commit ae4bacf

Please sign in to comment.