-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
78 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,47 +28,10 @@ jobs: | |
compute-version: | ||
name: Compute version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.version.outputs.version }} | ||
version_tag: ${{ steps.version.outputs.version_tag }} | ||
minecraft_version: ${{ steps.minecraftVersion.outputs.minecraft_version }} | ||
steps: | ||
- id: checkout | ||
name: "📦 Checkout" | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
|
||
- id: minecraftVersion | ||
name: "📦 Extract Minecraft version" | ||
run: | | ||
cat gradle.properties | grep exactMinecraftVersion | cut -d "=" -f 2 > minecraft_version.txt | ||
echo "Minecraft version: $(cat minecraft_version.txt)" | ||
echo "minecraft_version=$(cat minecraft_version.txt)" >> "$GITHUB_OUTPUT" | ||
- id: computeBranchSuffix | ||
name: "🔢 Compute branch suffix" | ||
if: github.event_name == 'push' | ||
run: | | ||
gitRef="${{ github.ref }}" | ||
branchName=$(echo "${gitRef/refs\/heads\//}") | ||
echo "Branch name: $branchName" | ||
cleanedBranchName=$(echo $branchName | sed 's/[^a-zA-Z0-9]/-/g') | ||
echo "Cleaned branch name: $cleanedBranchName" | ||
echo "branch_suffix=$cleanedBranchName" >> "$GITHUB_OUTPUT" | ||
- id: version | ||
name: "🔢 Compute version" | ||
uses: PaulHatch/[email protected] | ||
- uses: ldtteam/operapublicacreator/.github/workflows/gradle.version.yaml@${{ github.workflow_sha }} | ||
with: | ||
tag_prefix: "v" | ||
search_commit_body: true | ||
debug: true | ||
bump_each_commit: true | ||
version_format: "${major}.${minor}.${patch}-${{ steps.minecraftVersion.outputs.minecraft_version }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('branch-{0}', steps.computeBranchSuffix.outputs.branch_suffix) }}" | ||
suffix: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('branch-{0}', steps.computeBranchSuffix.outputs.branch_suffix) }} | ||
|
||
gradle: | ||
needs: [ "compute-version" ] # Make sure we now the version before starting to build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,22 +24,17 @@ on: | |
required: false | ||
type: number | ||
default: 100 | ||
|
||
secrets: | ||
DISCORD_WEBHOOK: | ||
required: true | ||
|
||
MAVEN_USER: | ||
required: true | ||
MAVEN_PASSWORD: | ||
required: true | ||
|
||
CURSE_API_KEY: | ||
required: true | ||
|
||
CROWDIN_API_KEY: | ||
required: true | ||
|
||
GRADLE_ENCRYPTION_KEY: | ||
required: true | ||
|
||
|
@@ -51,37 +46,13 @@ jobs: | |
compute-version: | ||
name: Compute version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.version.outputs.version }} | ||
version_tag: ${{ steps.version.outputs.version_tag }} | ||
minecraft_version: ${{ steps.minecraftVersion.outputs.minecraft_version }} | ||
steps: | ||
- id: checkout | ||
name: "📦 Checkout" | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
|
||
- id: minecraftVersion | ||
name: "📦 Extract Minecraft version" | ||
run: | | ||
cat gradle.properties | grep exactMinecraftVersion | cut -d "=" -f 2 > minecraft_version.txt | ||
echo "Minecraft version: $(cat minecraft_version.txt)" | ||
echo "minecraft_version=$(cat minecraft_version.txt)" >> "$GITHUB_OUTPUT" | ||
- id: version | ||
name: "🔢 Compute version" | ||
uses: PaulHatch/[email protected] | ||
- uses: ldtteam/operapublicacreator/.github/workflows/gradle.version.yaml@${{ github.workflow_sha }} | ||
with: | ||
tag_prefix: "v" | ||
search_commit_body: true | ||
debug: true | ||
bump_each_commit: true | ||
version_format: "${major}.${minor}.${patch}-${{ steps.minecraftVersion.outputs.minecraft_version }}-${{ inputs.curse_release_type }}" | ||
suffix: ${{ inputs.curse_release_type }} | ||
|
||
notify-build-start: | ||
needs: ["compute-version"] | ||
needs: [ "compute-version" ] | ||
name: "🔴 Build notifications (start)" | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -104,7 +75,7 @@ jobs: | |
target_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
|
||
gradle: | ||
needs: ["compute-version"] # Make sure we now the version before starting to build | ||
needs: [ "compute-version" ] # Make sure we now the version before starting to build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: checkout | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Common Version Determination CI | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
suffix: | ||
description: "The suffix to finish the version string with" | ||
required: false | ||
type: string | ||
default: "" | ||
outputs: | ||
version: ${{ jobs.compute-version.outputs.version }} | ||
minecraft_version: ${{ jobs.compute-version.outputs.minecraft_version }} | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
compute-version: | ||
name: Compute version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.version.outputs.version }} | ||
minecraft_version: ${{ steps.minecraftVersion.outputs.minecraft_version }} | ||
steps: | ||
- id: checkout | ||
name: "📦 Checkout" | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
|
||
- id: minecraftVersion | ||
name: "📦 Extract Minecraft version" | ||
run: | | ||
cat gradle.properties | grep exactMinecraftVersion | cut -d "=" -f 2 > minecraft_version.txt | ||
echo "Minecraft version: $(cat minecraft_version.txt)" | ||
echo "minecraft_version=$(cat minecraft_version.txt)" >> "$GITHUB_OUTPUT" | ||
- id: computeBranchSuffix | ||
name: "🔢 Compute branch suffix" | ||
if: github.event_name == 'push' | ||
run: | | ||
gitRef="${{ github.ref }}" | ||
branchName=$(echo "${gitRef/refs\/heads\//}") | ||
echo "Branch name: $branchName" | ||
cleanedBranchName=$(echo $branchName | sed 's/[^a-zA-Z0-9]/-/g') | ||
echo "Cleaned branch name: $cleanedBranchName" | ||
echo "branch_suffix=$cleanedBranchName" >> "$GITHUB_OUTPUT" | ||
- id: version | ||
name: "🔢 Compute version" | ||
uses: PaulHatch/[email protected] | ||
with: | ||
tag_prefix: "v" | ||
search_commit_body: true | ||
debug: true | ||
bump_each_commit: true | ||
version_format: "${major}.${minor}.${patch}-${{ steps.minecraftVersion.outputs.minecraft_version }}-${{ inputs.suffix }}" |