parent
3b742f4ddf
commit
216df6c178
90
.github/workflows/buildpack.yml
vendored
90
.github/workflows/buildpack.yml
vendored
@ -167,7 +167,7 @@ jobs:
|
|||||||
compression-level: 0
|
compression-level: 0
|
||||||
|
|
||||||
makeNames:
|
makeNames:
|
||||||
name: Make Artifact Names (${{ inputs.tag }})
|
name: Make Artifact Names and Changelogs (${{ inputs.tag }})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ inputs.separate_upload }}
|
if: ${{ inputs.separate_upload }}
|
||||||
outputs:
|
outputs:
|
||||||
@ -217,6 +217,26 @@ jobs:
|
|||||||
working-directory: ./tools
|
working-directory: ./tools
|
||||||
run: npm run gulp makeArtifactNames
|
run: npm run gulp makeArtifactNames
|
||||||
|
|
||||||
|
- name: Make Changelogs
|
||||||
|
if: ${{ !inputs.skip_changelog }}
|
||||||
|
working-directory: ./tools
|
||||||
|
run: npm run gulp buildChangelog
|
||||||
|
env:
|
||||||
|
CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }}
|
||||||
|
CHANGELOG_BRANCH: ${{ inputs.changelog_branch }}
|
||||||
|
CHANGELOG_URL: ${{ inputs.changelog_url }}
|
||||||
|
CHANGELOG_CF_URL: ${{ inputs.changelog_cf_url }}
|
||||||
|
COMPARE_TAG: ${{ inputs.compare_tag }}
|
||||||
|
|
||||||
|
- name: Upload Changelogs
|
||||||
|
if: ${{ !inputs.skip_changelog }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Changelogs
|
||||||
|
path: ./build/*.md
|
||||||
|
if-no-files-found: error
|
||||||
|
compression-level: 9
|
||||||
|
|
||||||
buildClient:
|
buildClient:
|
||||||
name: Build Pack Client (${{ inputs.tag }})
|
name: Build Pack Client (${{ inputs.tag }})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -250,24 +270,19 @@ jobs:
|
|||||||
working-directory: ./tools
|
working-directory: ./tools
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Check Environmental Variables
|
- name: Download Changelog Artifacts
|
||||||
working-directory: ./tools
|
if: ${{ !inputs.skip_changelog }}
|
||||||
run: npm run gulp check
|
uses: actions/download-artifact@v4
|
||||||
env:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
name: Changelogs
|
||||||
CURSEFORGE_PROJECT_ID: ${{ secrets.CURSEFORGE_PROJECT_ID }}
|
path: ./build/
|
||||||
CURSEFORGE_API_TOKEN: ${{ secrets.CURSEFORGE_API_TOKEN }}
|
|
||||||
CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build Client
|
- name: Build Client
|
||||||
working-directory: ./tools
|
working-directory: ./tools
|
||||||
run: npm run gulp buildClient
|
run: npm run gulp buildClient
|
||||||
env:
|
env:
|
||||||
CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }}
|
CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }}
|
||||||
CHANGELOG_BRANCH: ${{ inputs.changelog_branch }}
|
MADE_CHANGELOG: true # Changelog Already Exists
|
||||||
CHANGELOG_URL: ${{ inputs.changelog_url }}
|
|
||||||
CHANGELOG_CF_URL: ${{ inputs.changelog_cf_url }}
|
|
||||||
COMPARE_TAG: ${{ inputs.compare_tag }}
|
|
||||||
|
|
||||||
- name: Upload Client Zip
|
- name: Upload Client Zip
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@ -319,24 +334,19 @@ jobs:
|
|||||||
working-directory: ./tools
|
working-directory: ./tools
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Check Environmental Variables
|
- name: Download Changelog Artifacts
|
||||||
working-directory: ./tools
|
if: ${{ !inputs.skip_changelog }}
|
||||||
run: npm run gulp check
|
uses: actions/download-artifact@v4
|
||||||
env:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
name: Changelogs
|
||||||
CURSEFORGE_PROJECT_ID: ${{ secrets.CURSEFORGE_PROJECT_ID }}
|
path: ./build/
|
||||||
CURSEFORGE_API_TOKEN: ${{ secrets.CURSEFORGE_API_TOKEN }}
|
|
||||||
CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build Server
|
- name: Build Server
|
||||||
working-directory: ./tools
|
working-directory: ./tools
|
||||||
run: npm run gulp buildServer
|
run: npm run gulp buildServer
|
||||||
env:
|
env:
|
||||||
CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }}
|
CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }}
|
||||||
CHANGELOG_BRANCH: ${{ inputs.changelog_branch }}
|
MADE_CHANGELOG: true # Changelog Already Exists
|
||||||
CHANGELOG_URL: ${{ inputs.changelog_url }}
|
|
||||||
CHANGELOG_CF_URL: ${{ inputs.changelog_cf_url }}
|
|
||||||
COMPARE_TAG: ${{ inputs.compare_tag }}
|
|
||||||
|
|
||||||
- name: Upload Server Zip
|
- name: Upload Server Zip
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@ -379,24 +389,19 @@ jobs:
|
|||||||
working-directory: ./tools
|
working-directory: ./tools
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Check Environmental Variables
|
- name: Download Changelog Artifacts
|
||||||
working-directory: ./tools
|
if: ${{ !inputs.skip_changelog }}
|
||||||
run: npm run gulp check
|
uses: actions/download-artifact@v4
|
||||||
env:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
name: Changelogs
|
||||||
CURSEFORGE_PROJECT_ID: ${{ secrets.CURSEFORGE_PROJECT_ID }}
|
path: ./build/
|
||||||
CURSEFORGE_API_TOKEN: ${{ secrets.CURSEFORGE_API_TOKEN }}
|
|
||||||
CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build Lang and Changelogs
|
- name: Build Lang
|
||||||
working-directory: ./tools
|
working-directory: ./tools
|
||||||
run: npm run gulp buildLang
|
run: npm run gulp buildLang
|
||||||
env:
|
env:
|
||||||
CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }}
|
CFCORE_API_TOKEN: ${{ secrets.CFCORE_API_TOKEN }}
|
||||||
CHANGELOG_BRANCH: ${{ inputs.changelog_branch }}
|
MADE_CHANGELOG: true # Changelog Already Exists
|
||||||
CHANGELOG_URL: ${{ inputs.changelog_url }}
|
|
||||||
CHANGELOG_CF_URL: ${{ inputs.changelog_cf_url }}
|
|
||||||
COMPARE_TAG: ${{ inputs.compare_tag }}
|
|
||||||
|
|
||||||
- name: Upload Lang Zip
|
- name: Upload Lang Zip
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@ -405,12 +410,3 @@ jobs:
|
|||||||
path: ./build/lang/**/*
|
path: ./build/lang/**/*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
compression-level: 9
|
compression-level: 9
|
||||||
|
|
||||||
- name: Upload Changelogs
|
|
||||||
if: ${{ !inputs.skip_changelog }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: Changelogs
|
|
||||||
path: ./build/*.md
|
|
||||||
if-no-files-found: error
|
|
||||||
compression-level: 9
|
|
||||||
|
2
.github/workflows/checks.yml
vendored
2
.github/workflows/checks.yml
vendored
@ -3,7 +3,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- test_buildscript*
|
- test-buildscript*
|
||||||
- dev/*
|
- dev/*
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "README.md"
|
- "README.md"
|
||||||
|
2
.github/workflows/testbuildpack.yml
vendored
2
.github/workflows/testbuildpack.yml
vendored
@ -4,7 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- test_buildscript*
|
- test-buildscript*
|
||||||
- dev/*
|
- dev/*
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "README.md"
|
- "README.md"
|
||||||
|
2
.github/workflows/testcommits.yml
vendored
2
.github/workflows/testcommits.yml
vendored
@ -5,7 +5,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- test_buildscript*
|
- test-buildscript*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
testCommits:
|
testCommits:
|
||||||
|
@ -14,7 +14,7 @@ export const updateFilesAll = transformFiles.updateAll;
|
|||||||
import * as changelog from "./tasks/changelog/index.ts";
|
import * as changelog from "./tasks/changelog/index.ts";
|
||||||
export const createChangelog = changelog.createRootChangelog;
|
export const createChangelog = changelog.createRootChangelog;
|
||||||
|
|
||||||
import sharedTasks from "./tasks/shared/index.ts";
|
import * as sharedTasks from "./tasks/shared/index.ts";
|
||||||
import clientTasks from "./tasks/client/index.ts";
|
import clientTasks from "./tasks/client/index.ts";
|
||||||
import serverTasks from "./tasks/server/index.ts";
|
import serverTasks from "./tasks/server/index.ts";
|
||||||
import langTasks from "./tasks/lang/index.ts";
|
import langTasks from "./tasks/lang/index.ts";
|
||||||
@ -22,23 +22,27 @@ import mmcTasks from "./tasks/mmc/index.ts";
|
|||||||
import * as modTasks from "./tasks/misc/downloadMods.ts";
|
import * as modTasks from "./tasks/misc/downloadMods.ts";
|
||||||
|
|
||||||
export const buildClient = gulp.series(
|
export const buildClient = gulp.series(
|
||||||
sharedTasks,
|
sharedTasks.default,
|
||||||
clientTasks,
|
clientTasks,
|
||||||
pruneCacheTask,
|
pruneCacheTask,
|
||||||
);
|
);
|
||||||
export const buildServer = gulp.series(
|
export const buildServer = gulp.series(
|
||||||
gulp.parallel(sharedTasks, modTasks.downloadSharedAndServer),
|
gulp.parallel(sharedTasks.default, modTasks.downloadSharedAndServer),
|
||||||
serverTasks,
|
serverTasks,
|
||||||
pruneCacheTask,
|
pruneCacheTask,
|
||||||
);
|
);
|
||||||
export const buildLang = gulp.series(sharedTasks, langTasks, pruneCacheTask);
|
export const buildLang = gulp.series(
|
||||||
|
sharedTasks.default,
|
||||||
|
langTasks,
|
||||||
|
pruneCacheTask,
|
||||||
|
);
|
||||||
export const buildMMC = gulp.series(
|
export const buildMMC = gulp.series(
|
||||||
gulp.parallel(sharedTasks, modTasks.downloadSharedAndClient),
|
gulp.parallel(sharedTasks.default, modTasks.downloadSharedAndClient),
|
||||||
mmcTasks,
|
mmcTasks,
|
||||||
pruneCacheTask,
|
pruneCacheTask,
|
||||||
);
|
);
|
||||||
export const buildAll = gulp.series(
|
export const buildAll = gulp.series(
|
||||||
sharedTasks,
|
sharedTasks.default,
|
||||||
gulp.parallel(
|
gulp.parallel(
|
||||||
clientTasks,
|
clientTasks,
|
||||||
langTasks,
|
langTasks,
|
||||||
@ -46,6 +50,7 @@ export const buildAll = gulp.series(
|
|||||||
),
|
),
|
||||||
pruneCacheTask,
|
pruneCacheTask,
|
||||||
);
|
);
|
||||||
|
export const buildChangelog = sharedTasks.buildChangelog;
|
||||||
|
|
||||||
import checkTasks from "./tasks/checks/index.ts";
|
import checkTasks from "./tasks/checks/index.ts";
|
||||||
export const check = gulp.series(checkTasks);
|
export const check = gulp.series(checkTasks);
|
||||||
|
@ -15,8 +15,9 @@ import { FileDef } from "#types/fileDef.ts";
|
|||||||
import {
|
import {
|
||||||
downloadFileDef,
|
downloadFileDef,
|
||||||
downloadOrRetrieveFileDef,
|
downloadOrRetrieveFileDef,
|
||||||
isEnvVariableSet, promiseStream,
|
isEnvVariableSet,
|
||||||
shouldSkipChangelog
|
promiseStream,
|
||||||
|
shouldSkipChangelog,
|
||||||
} from "#utils/util.ts";
|
} from "#utils/util.ts";
|
||||||
import transformVersion from "./transformVersion.ts";
|
import transformVersion from "./transformVersion.ts";
|
||||||
import { createBuildChangelog } from "../changelog/index.ts";
|
import { createBuildChangelog } from "../changelog/index.ts";
|
||||||
@ -114,6 +115,20 @@ async function fetchExternalDependencies() {
|
|||||||
async function fetchOrMakeChangelog() {
|
async function fetchOrMakeChangelog() {
|
||||||
if (shouldSkipChangelog()) return;
|
if (shouldSkipChangelog()) return;
|
||||||
|
|
||||||
|
if (isEnvVariableSet("MADE_CHANGELOG")) {
|
||||||
|
let made = false;
|
||||||
|
try {
|
||||||
|
made = JSON.parse((process.env.MADE_CHANGELOG ?? "false").toLowerCase());
|
||||||
|
} catch (err) {
|
||||||
|
throw new Error("Made Changelog Env Variable set to Invalid Value.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (made) {
|
||||||
|
logInfo("Already Made Changelogs...");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
isEnvVariableSet("CHANGELOG_URL") &&
|
isEnvVariableSet("CHANGELOG_URL") &&
|
||||||
isEnvVariableSet("CHANGELOG_CF_URL")
|
isEnvVariableSet("CHANGELOG_CF_URL")
|
||||||
@ -196,3 +211,9 @@ export default gulp.series(
|
|||||||
transformVersion,
|
transformVersion,
|
||||||
transformQuestBook,
|
transformQuestBook,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const buildChangelog = gulp.series(
|
||||||
|
sharedCleanUp,
|
||||||
|
createSharedDirs,
|
||||||
|
fetchOrMakeChangelog,
|
||||||
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user