refactor: Try new github actions script
Some checks failed
Build BAB Application Deployment Artifact / build (push) Failing after 1m48s
Some checks failed
Build BAB Application Deployment Artifact / build (push) Failing after 1m48s
This commit is contained in:
@@ -3,7 +3,8 @@ run-name: ${{ gitea.actor }} is building a BAB App artifact 🚀
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- devel
|
- main
|
||||||
|
- alpha
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -30,10 +31,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
/bin/cat .env.local
|
/bin/cat .env.local
|
||||||
- name: Build Project
|
- name: Build Project
|
||||||
run: quasar build -m pwa
|
run: npm run build
|
||||||
- name: Get Version Number
|
- name: Set VERSION from VERSION file
|
||||||
id: get_version
|
id: get_version
|
||||||
run: echo "::set-output name=VERSION::$(node -p "require('./package.json').version")"
|
run: |
|
||||||
|
VERSION=$(cat VERSION)
|
||||||
|
echo "VERSION=$VERSION"
|
||||||
|
echo "::set-output name=VERSION::$VERSION"
|
||||||
- name: Tarfile
|
- name: Tarfile
|
||||||
run: |
|
run: |
|
||||||
cd dist/pwa
|
cd dist/pwa
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -37,4 +37,5 @@ yarn-error.log*
|
|||||||
.env*
|
.env*
|
||||||
|
|
||||||
# version file
|
# version file
|
||||||
src/version.js
|
src/version.js
|
||||||
|
VERSION
|
||||||
|
|||||||
@@ -17,9 +17,12 @@ try {
|
|||||||
|
|
||||||
// Create version content
|
// Create version content
|
||||||
const versionContent = `export const APP_VERSION = '${version}';\n`;
|
const versionContent = `export const APP_VERSION = '${version}';\n`;
|
||||||
|
const versionTxtFilePath = path.resolve(__dirname, './VERSION');
|
||||||
const versionFilePath = path.resolve(__dirname, 'src/version.js');
|
const versionFilePath = path.resolve(__dirname, 'src/version.js');
|
||||||
|
|
||||||
// Write version to file
|
// Write version to TXT file
|
||||||
|
fs.writeFileSync(versionTxtFilePath, version, 'utf8');
|
||||||
|
// Write version to js file
|
||||||
fs.writeFileSync(versionFilePath, versionContent, 'utf8');
|
fs.writeFileSync(versionFilePath, versionContent, 'utf8');
|
||||||
console.log(`Version file generated with version: ${version}`);
|
console.log(`Version file generated with version: ${version}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user