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:
|
||||
push:
|
||||
branches:
|
||||
- devel
|
||||
- main
|
||||
- alpha
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -30,10 +31,13 @@ jobs:
|
||||
run: |
|
||||
/bin/cat .env.local
|
||||
- name: Build Project
|
||||
run: quasar build -m pwa
|
||||
- name: Get Version Number
|
||||
run: npm run build
|
||||
- name: Set VERSION from VERSION file
|
||||
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
|
||||
run: |
|
||||
cd dist/pwa
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -37,4 +37,5 @@ yarn-error.log*
|
||||
.env*
|
||||
|
||||
# version file
|
||||
src/version.js
|
||||
src/version.js
|
||||
VERSION
|
||||
|
||||
@@ -17,9 +17,12 @@ try {
|
||||
|
||||
// Create version content
|
||||
const versionContent = `export const APP_VERSION = '${version}';\n`;
|
||||
const versionTxtFilePath = path.resolve(__dirname, './VERSION');
|
||||
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');
|
||||
console.log(`Version file generated with version: ${version}`);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user