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