Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/build_setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ runs:
uses: gradle/actions/setup-gradle@v4
with:
cache-write-only: ${{ inputs.update-cache }}
cache-read-only: ${{ github.ref != 'refs/heads/1.21' }}
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
add-job-summary: 'on-failure'
8 changes: 2 additions & 6 deletions .github/json/config-latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,12 @@
"ignore_labels": ["ignore changelog"],
"tag_resolver": {
"method": "semver",
"filter": {
"pattern": "^(?!v?[0-9\\.]+(-1\\.21)$).+$",
"flags": "gu"
},
"transformer": {
"pattern": "v?([0-9\\.]+)(-[0-9\\.]+)?",
"target": "$1"
}
},
"max_pull_requests": 1000,
"max_back_track_time_days": 365,
"base_branches": ["1.21"]
}
"base_branches": ["main"]
}
8 changes: 2 additions & 6 deletions .github/json/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,12 @@
"ignore_labels": ["ignore changelog"],
"tag_resolver": {
"method": "semver",
"filter": {
"pattern": "^(?!v?[0-9\\.]+(-1\\.21)$).+$",
"flags": "gu"
},
"transformer": {
"pattern": "v?([0-9\\.]+)(-[0-9\\.]+)?",
"target": "$1"
}
},
"max_pull_requests": 1000,
"max_back_track_time_days": 365,
"base_branches": ["1.21"]
}
"base_branches": ["main"]
}
8 changes: 4 additions & 4 deletions .github/workflows/auto-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Latest Build

on:
push:
branches: ['1.21']
branches: ['main']
paths: ['**/src/**', '**/*.gradle', 'gradle.properties', 'gradle/**', 'gradlew*']

concurrency:
Expand Down Expand Up @@ -61,11 +61,11 @@ jobs:
if: ${{ env.PUBLISH == 'true' }}
uses: andelf/nightly-release@46e2d5f80828ecc5c2c3c819eb31186a7cf2156c
with:
tag_name: latest-${{ github.ref_name }}
name: '${{ github.ref_name }}-${{ steps.ver.outputs.version}} SNAPSHOT ${{ env.VERSION_SUFFIX }}'
tag_name: latest
name: 'MixinSplice ${{ steps.ver.outputs.version }} SNAPSHOT ${{ env.VERSION_SUFFIX }}'
prerelease: true
body: |
The latest build of MixinSplice for Minecraft ${{ github.ref_name }}.
The latest build of MixinSplice for Fabric, Forge, and NeoForge.
Please report any [issues](${{ github.server_url }}/${{ github.repository }}/issues).
${{ steps.changelog.outputs.changelog }}
files: build/libs/*.jar
2 changes: 1 addition & 1 deletion .github/workflows/format-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Java Formatting

on:
push:
branches: ['1.21']
branches: ['main']
paths:
- '**/src/*/java/**'
- '**/src/*/kotlin/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manage-issue-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: '1.21'
ref: main
sparse-checkout: '.github/labeler.yml'
- uses: github/issue-labeler@v3.3
with:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/publish-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@ jobs:
fetchViaCommits: true
failOnError: true

publish-21:
name: 1.21.1
publish:
name: Publish MixinSplice
needs: [ meta ]
if: ${{ contains(github.ref_name, '1.21') }}
secrets: inherit
uses: ./.github/workflows/publish.yml
with:
simulate: ${{ startsWith(github.event.release.name, 'simulate') || github.repository_owner != 'ExtremelyFrozen' }}
tag-name: ${{ github.ref_name }}
version: '1.21'
release-body: ${{ github.event.release.body }}
changelog-body: ${{ needs.meta.outputs.CHANGELOG }}
changelog-body: ${{ needs.meta.outputs.CHANGELOG }}
76 changes: 3 additions & 73 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ on:
description: 'Tag to build from and upload to'
required: true
type: string
version:
description: 'Version identifier; 1.21'
required: true
type: string
release-body:
description: 'Body for published release notes'
required: false
Expand Down Expand Up @@ -80,72 +76,6 @@ jobs:
files: ./*.jar
fail_on_unmatched_files: true

# publish-modrinth:
# name: Publish to Modrinth
# needs: build
# if: ${{ !inputs.simulate }}
# runs-on: ubuntu-latest
# permissions:
# contents: write
# steps:
# - name: Download artifacts
# uses: actions/download-artifact@v4
# with:
# name: build-artifacts-${{ inputs.branch }}
# - name: Publish Mod
# env:
# MC_VERSION: ${{ inputs.branch == '1.21' && '1.21.1' || '1.20.1' }}
# LOADER: ${{ inputs.branch == '1.21' && 'neoforge' || 'forge' }}
# JAVA: ${{ inputs.branch == '1.21' && '21' || '17' }}
# VERSION_TYPE: ${{ inputs.branch == '1.21' && 'beta' || 'beta' }}
# uses: Kir-Antipov/mc-publish@v3.3.0
# with:
# modrinth-id: aADDBrNC
# modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
# files: |
# ./gtmoremachine-${{ env.MC_VERSION }}-${{ needs.build.outputs.ver }}.jar
# ./!(gtmoremachine-${{ env.MC_VERSION }}-${{ needs.build.outputs.ver }}.jar)
# name: 'GTMoreMachine ${{ env.MC_VERSION }}-${{ needs.build.outputs.ver }}'
# version: 'mc${{ env.MC_VERSION }}-${{ needs.build.outputs.ver }}'
# version-type: ${{ env.VERSION_TYPE }}
# changelog: ${{ inputs.release-body }}
# loaders: ${{ env.LOADER }}
# java: ${{ env.JAVA }}
# fail-mode: fail
#
# publish-cf:
# name: Publish to CF
# needs: build
# if: ${{ !inputs.simulate }}
# runs-on: ubuntu-latest
# permissions:
# contents: write
# steps:
# - name: Download artifacts
# uses: actions/download-artifact@v4
# with:
# name: build-artifacts-${{ inputs.branch }}
# - name: Publish Mod
# env:
# MC_VERSION: ${{ inputs.branch == '1.21' && '1.21.1' || '1.20.1' }}
# LOADER: ${{ inputs.branch == '1.21' && 'neoforge' || 'forge' }}
# JAVA: ${{ inputs.branch == '1.21' && '21' || '17' }}
# VERSION_TYPE: ${{ inputs.branch == '1.21' && 'alpha' || 'beta' }}
# uses: Kir-Antipov/mc-publish@v3.3.0
# with:
# curseforge-id: 1397216
# curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
# files: |
# ./gtmoremachine-${{ env.MC_VERSION }}-${{ needs.build.outputs.ver }}.jar
# ./!(gtmoremachine-${{ env.MC_VERSION }}-${{ needs.build.outputs.ver }}.jar)
# name: 'GTMoreMachine ${{ env.MC_VERSION }}-${{ needs.build.outputs.ver }}'
# version: 'mc${{ env.MC_VERSION }}-${{ needs.build.outputs.ver }}'
# version-type: ${{ env.VERSION_TYPE }}
# changelog: ${{ inputs.release-body }}
# loaders: ${{ env.LOADER }}
# java: ${{ env.JAVA }}
# fail-mode: fail

# 发布成功后,通过 PR 更新版本号和变更日志。
bump-version-and-changelog:
name: Bump Version and Build Changelog
Expand All @@ -163,7 +93,7 @@ jobs:
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git switch -C gh/release-${{ inputs.version }}
git switch -C gh/release-${{ inputs.branch }}
BUMPED=$(echo ${{ needs.build.outputs.ver }} | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.)
sed -i "s/= ${{ needs.build.outputs.ver }}/= ${BUMPED}/" gradle.properties
git commit -am "Bump version to ${BUMPED}"
Expand All @@ -176,5 +106,5 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
git push --force --set-upstream origin gh/release-${{ inputs.version }}
gh pr create -B ${{ inputs.version }} -H gh/release-${{ inputs.version }} --title "RELEASE for ${{ inputs.version }} [no-snapshot]" --body "Created by GH Workflow" --label "ignore changelog"
git push --force --set-upstream origin gh/release-${{ inputs.branch }}
gh pr create -B ${{ inputs.branch }} -H gh/release-${{ inputs.branch }} --title "RELEASE for ${{ inputs.branch }} [no-snapshot]" --body "Created by GH Workflow" --label "ignore changelog"
4 changes: 2 additions & 2 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Sync Github Folder

on:
push:
branches: ['1.21']
branches: ['main']
paths: ['.github/**']

jobs:
Expand All @@ -17,7 +17,7 @@ jobs:
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git switch -C gh/workflow-sync
git fetch origin
git checkout origin/1.21 -- .github
git checkout origin/main -- .github
git add .github
git commit --allow-empty -m "Sync Workflows"
git push --force --set-upstream origin gh/workflow-sync
2 changes: 1 addition & 1 deletion .github/workflows/update-gradle-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Update Gradle Cache

on:
push:
branches: ['1.21']
branches: ['main']
paths: ['gradle/**', '**/*.gradle', 'gradle.properties', 'gradlew*']
workflow_dispatch:

Expand Down
2 changes: 1 addition & 1 deletion gradle/scripts/jars.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def publishedSources = fabric ? tasks.named('remapSourcesJar', Jar) : sourcesArc

base {
// 平台子项目名同时用作发行文件名中的 Loader 标识。
archivesName = "${rootProject.name}-${project.name}-${libs.versions.minecraft.get()}"
archivesName = "${rootProject.name}-${project.name}"
}

[mainArchive, slimArchive, publishedSources].each { archive ->
Expand Down
Loading