Add release build config

This commit is contained in:
Andrei Andreev 2022-11-30 01:03:24 +01:00
parent 33dfb81e8c
commit 7f72d5a205
7 changed files with 46 additions and 6 deletions

1
.env.master Normal file
View File

@ -0,0 +1 @@
VUE_APP_DEV=true

View File

@ -22,7 +22,7 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run build
- uses: JamesIves/github-pages-deploy-action@4.1.3
- uses: JamesIves/github-pages-deploy-action@4.4.1
with:
branch: gh-pages
folder: dist

31
.github/workflows/deploy-release.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Deploy 🚀
on:
push:
branches:
- master
workflow_dispatch:
branches:
- master
jobs:
build:
name: Deploy 🚀
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
lfs: true
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'npm'
- run: npm ci
- run: npm run build
- uses: JamesIves/github-pages-deploy-action@4.4.1
with:
token: ${{ secrets.GH_PUBLISH_TOKEN }}
repository-name: IvarK/AyyLmao5Hours
branch: master
folder: dist
single-commit: true

View File

@ -3,7 +3,7 @@ import { sha512_256 } from "js-sha512";
import { DC } from "./constants";
import FullScreenAnimationHandler from "./full-screen-animation-handler";
export const DEV = true;
export const DEV = process.env.VUE_APP_DEV === "true";
/* eslint-disable no-console */
// Disabling no-console here seems

View File

@ -6,6 +6,7 @@ import { SpeedrunMilestones } from "./core/speedrun";
import { supportedBrowsers } from "./supported-browsers";
import Payments from "./core/payments";
import { DEV } from "./core/devtools";
if (GlobalErrorHandler.handled) {
throw new Error("Initialization failed");
@ -1048,6 +1049,10 @@ export function browserCheck() {
export function init() {
// eslint-disable-next-line no-console
console.log("🌌 Antimatter Dimensions: Reality Update 🌌");
if (DEV) {
// eslint-disable-next-line no-console
console.log("👨‍💻 Development Mode 👩‍💻");
}
GameStorage.load();
Tabs.all.find(t => t.config.id === player.options.lastOpenTab).show(true);
Payments.init();

View File

@ -2,7 +2,8 @@
"private": true,
"scripts": {
"serve": "node build/check-npm.js && vue-cli-service serve",
"build": "node build/pre-build.js && vue-cli-service build && node build/post-build.js",
"build:master": "node build/pre-build.js && vue-cli-service build --mode master && node build/post-build.js",
"build:release": "node build/pre-build.js && vue-cli-service build && node build/post-build.js",
"lint": "vue-cli-service lint"
},
"dependencies": {

View File

@ -1,11 +1,13 @@
/**
* @type {import('@vue/cli-service').ProjectOptions}
*/
const isDev = process.env.VUE_APP_DEV === "true";
module.exports = {
publicPath: "./",
lintOnSave: false,
configureWebpack: {
devtool: "eval-source-map",
},
runtimeCompiler: true
devtool: isDev ? "eval-source-map" : "source-map",
}
};