-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start publishing SNAPSHOT versions to the maven (#1739)
- Loading branch information
Showing
6 changed files
with
88 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
changelog: | ||
|
||
exclude: | ||
labels: | ||
- "1.21" | ||
- "ignore changelog" | ||
|
||
categories: | ||
- title: New Features | ||
labels: | ||
- "type: feature" | ||
|
||
- title: Bug Fixes | ||
labels: | ||
- "type: bug" | ||
|
||
- title: Internal Changes | ||
labels: | ||
- "type: refactor" | ||
|
||
- title: Translation Changes | ||
labels: | ||
- "type: translation" | ||
|
||
- title: Other Changes | ||
labels: | ||
- "*" |
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 |
---|---|---|
|
@@ -9,8 +9,9 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_ACTION_NUMBER: ${{ vars.GITHUB_RUN_NUMBER }} | ||
GITHUB_RUN_NUMBER: ${{ vars.GITHUB_RUN_NUMBER }} | ||
MAVEN_PASS: ${{ secrets.MAVEN_PASS }} | ||
MAVEN_USER: ${{ secrets.MAVEN_USER }} | ||
SNAPSHOT: true | ||
permissions: | ||
contents: write | ||
steps: | ||
|
@@ -26,17 +27,22 @@ jobs: | |
with: | ||
arguments: build | ||
|
||
- name: Publish to Maven | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: publish | ||
|
||
- name: Get Version | ||
id: var | ||
run: | | ||
MESSAGE=$(ls build/libs/* | grep sources.jar -v | grep shadow.jar -v | grep slim.jar -v | awk -F 'gtceu-|.jar' '{print $2}') | ||
MESSAGE=$(ls build/libs/* | grep sources.jar -v | grep shadow.jar -v | grep slim.jar -v | awk -F 'gtceu-|-SNAPSHOT.jar' '{print $2}') | ||
echo "version=$MESSAGE" >> $GITHUB_OUTPUT | ||
- name: Release | ||
id: release | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
github-tag: ${{ steps.var.outputs.version }} | ||
github-tag: ${{ steps.var.outputs.version }}-build_${{ vars.GITHUB_RUN_NUMBER }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
files: | | ||
build/libs/!(*-@(dev|sources|javadoc)).jar | ||
|
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 |
---|---|---|
|
@@ -3,6 +3,10 @@ name: Auto Publish, Releasing | |
on: | ||
workflow_dispatch: | ||
inputs: | ||
lastReleaseTag: | ||
description: 'tag of the last full release.' | ||
required: true | ||
type: string | ||
releaseType: | ||
description: 'release type' | ||
required: true | ||
|
@@ -29,6 +33,8 @@ jobs: | |
env: | ||
MAVEN_PASS: ${{ secrets.MAVEN_PASS }} | ||
MAVEN_USER: ${{ secrets.MAVEN_USER }} | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -60,10 +66,21 @@ jobs: | |
MESSAGE=$(ls build/libs/* | grep sources.jar -v | grep shadow.jar -v | grep slim.jar -v | awk -F 'gtceu-|.jar' '{print $2}') | ||
echo version=$MESSAGE >> $GITHUB_OUTPUT | ||
- name: Update CHANGELOG | ||
id: changelog | ||
uses: requarks/changelog-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fromTag: ${{ github.ref_name }} | ||
toTag: ${{ inputs.lastReleaseTag }} | ||
|
||
- if: ${{ inputs.publishCurseForgeAndModrinth }} | ||
name: mc-publish-forge | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
github-tag: ${{ steps.var.outputs.version }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Only include this section if you wish to publish | ||
# your assets on Modrinth. | ||
modrinth-id: 7tG215v7 | ||
|
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Updates the Gradle Cache when necessary | ||
name: Update Gradle Cache | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: ['gradle/**', '**.gradle', 'gradle.properties', 'gradlew**', 'src/main/resources/accesstransformer.cfg'] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: gradle-cache-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
update-cache: | ||
name: Update Grade Cache | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Build | ||
uses: ./.github/actions/build_setup | ||
with: | ||
update-cache: true | ||
|
||
- name: Build Project with Gradle | ||
run: ./gradlew assemble --warning-mode all --build-cache |
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