-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revamp Workflows for Optimal Productivity (#2112)
- Loading branch information
Showing
15 changed files
with
351 additions
and
106 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"categories": [ | ||
{ | ||
"title": "### Added", | ||
"labels": ["type: feature"] | ||
}, | ||
{ | ||
"title": "### Fixed", | ||
"labels": ["type: bugfix"] | ||
}, | ||
{ | ||
"title": "### Changed", | ||
"labels": ["type: refactor", "type: translation"] | ||
} | ||
], | ||
"sort": "ASC", | ||
"template": "## Changes\n#{{CHANGELOG}}", | ||
"pr_template": "- #{{TITLE}} by #{{AUTHOR}} in [##{{NUMBER}}](#{{URL}})", | ||
"ignore_labels": ["ignore changelog"], | ||
"max_pull_requests": 1000, | ||
"max_back_track_time_days": 90 | ||
} |
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,35 @@ | ||
{ | ||
"categories": [ | ||
{ | ||
"title": "### Added", | ||
"labels": ["type: feature"] | ||
}, | ||
{ | ||
"title": "### Fixed", | ||
"labels": ["type: bugfix"] | ||
}, | ||
{ | ||
"title": "### Changed", | ||
"labels": ["type: refactor", "type: translation"] | ||
} | ||
], | ||
"sort": "ASC", | ||
"template": "## Version [#{{TO_TAG}}](#{{RELEASE_DIFF}})\n#{{CHANGELOG}} ", | ||
"pr_template": "- #{{TITLE}} by #{{AUTHOR}} in [##{{NUMBER}}](#{{URL}})", | ||
"empty_template": "- No changes", | ||
"ignore_labels": ["ignore changelog"], | ||
"tag_resolver": { | ||
"method": "semver", | ||
"filter": { | ||
"pattern": "^(?!v?(1\\.20\\.1-)?[0-9\\.]+$).+$", | ||
"flags": "gu" | ||
}, | ||
"transformer": { | ||
"pattern": "v?([0-9\\.]+-)?([0-9\\.]+)", | ||
"target": "$2" | ||
} | ||
}, | ||
"max_pull_requests": 1000, | ||
"max_back_track_time_days": 90, | ||
"base_branches": ["1.20.1"] | ||
} |
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
name: auto-build | ||
name: Latest Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- '1.20.1' | ||
branches: ['1.20.1', '1.21'] | ||
paths-ignore: ['.github/**', '**/*.md'] | ||
|
||
concurrency: | ||
group: auto-build-${{ github.head_ref || github.ref }} | ||
group: auto-build-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
@@ -16,41 +16,45 @@ jobs: | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | ||
MAVEN_USER: ${{ secrets.MAVEN_USER }} | ||
SNAPSHOT: true | ||
GITHUB_TOKEN: ${{ github.token }} | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup Build | ||
uses: ./.github/actions/build_setup | ||
|
||
- name: Get Version | ||
id: ver | ||
run: echo "version=$(./gradlew -q printVersion)" >> $GITHUB_OUTPUT | ||
- name: Build | ||
run: ./gradlew build --build-cache | ||
|
||
- name: Publish to Maven | ||
if: github.repository_owner == 'GregTechCEu' | ||
run: ./gradlew publish --build-cache | ||
|
||
- name: Get Version | ||
id: var | ||
run: | | ||
VER=$(./gradlew -q printVersion) | ||
BUILD_VER=$VER-build_${{ github.run_number }} | ||
for jar in ./build/libs/*; do mv "$jar" "${jar/${VER}-SNAPSHOT/${BUILD_VER}-SNAPSHOT}";done 2>/dev/null | ||
echo "version=$BUILD_VER" >> $GITHUB_OUTPUT | ||
- name: Release | ||
id: release | ||
uses: Kir-Antipov/[email protected] | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
github-tag: ${{ steps.var.outputs.version }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
files: | | ||
build/libs/!(*-@(dev|dev-all|dev-slim|javadoc)).jar | ||
- name: Print Output | ||
run: | | ||
echo "Release tag: ${{ steps.release.outputs.github-tag }}" | ||
echo "Release URL: ${{ steps.release.outputs.github-url }}" | ||
echo "Released files: ${{ steps.release.outputs.github-files }}" | ||
name: build-artifacts | ||
path: build/libs/* | ||
if-no-files-found: error | ||
retention-days: 90 | ||
- name: Changelog | ||
id: changelog | ||
uses: mikepenz/release-changelog-builder-action@v5 | ||
with: | ||
configuration: ./.github/json/config-latest.json | ||
fromTag: latest-${{ github.ref_name }} | ||
toTag: ${{ github.ref }} | ||
fetchViaCommits: true | ||
failOnError: false | ||
- name: Release Latest | ||
uses: andelf/nightly-release@46e2d5f80828ecc5c2c3c819eb31186a7cf2156c | ||
with: | ||
tag_name: latest-${{ github.ref_name }} | ||
name: '${{ github.ref_name }}-${{ steps.ver.outputs.version}} SNAPSHOT $$' | ||
prerelease: true | ||
body: | | ||
The latest build of GTM for Minecraft ${{ github.ref_name }}. | ||
Please report any [issues](https://github.com/GregTechCEu/GregTech-Modern/issues). | ||
${{ steps.changelog.outputs.changelog }} | ||
files: build/libs/*.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 |
---|---|---|
|
@@ -4,40 +4,37 @@ on: | |
pull_request: | ||
paths: ['**'] | ||
|
||
# Cancel previous jobs if PR gets another push | ||
concurrency: | ||
group: PR-build-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_RUN_NUMBER: ${{ vars.GITHUB_RUN_NUMBER }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Check Path Filter | ||
uses: dorny/paths-filter@v3 | ||
id: filter | ||
with: | ||
filters: | | ||
code: | ||
- 'src/**' | ||
- '**.gradle' | ||
- '*.gradle' | ||
- 'gradle.properties' | ||
- 'gradlew**' | ||
- 'gradlew*' | ||
- 'gradle/**' | ||
- name: Setup Build | ||
if: steps.filter.outputs.code == 'true' | ||
uses: ./.github/actions/build_setup | ||
|
||
- name: Build | ||
if: steps.filter.outputs.code == 'true' | ||
run: ./gradlew assemble --build-cache | ||
|
||
- name: Upload Artifact | ||
if: steps.filter.outputs.code == 'true' | ||
uses: actions/[email protected] | ||
with: | ||
name: build output | ||
path: build/libs/* | ||
retention-days: 30 | ||
retention-days: 15 |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.