fix: make build process work
Some checks failed
Build BAB Application Deployment Artifact / build (push) Failing after 2m6s
Some checks failed
Build BAB Application Deployment Artifact / build (push) Failing after 2m6s
This commit is contained in:
@@ -8,6 +8,8 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
env:
|
||||
RUNNER_TOOL_CACHE: /toolcache
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -33,9 +35,10 @@ jobs:
|
||||
- name: Build and Release
|
||||
id: build
|
||||
run: |
|
||||
npm run semantic-version
|
||||
npx semantic-release
|
||||
env:
|
||||
GT_TOKEN: ${{ secrets.GT_TOKEN }}
|
||||
GITEA_TOKEN: ${{ secrets.GT_TOKEN }}
|
||||
GITEA_URL: ${{ vars.GT_URL }}
|
||||
- name: Trigger Ansible Deploy Playbook
|
||||
uses: https://github.com/distributhor/workflow-webhook@v3
|
||||
with:
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
[
|
||||
"@semantic-release/exec",
|
||||
{
|
||||
"prepareCmd": "quasar build -m pwa",
|
||||
"prepareCmd": "npm run generate-version '${nextRelease.version}' && quasar build -m pwa",
|
||||
"publishCmd": "tar -czvf release-${nextRelease.version}.tar.gz dist/pwa && echo '::set-output name=VERSION::${nextRelease.version}'"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -1,19 +1,10 @@
|
||||
const { execSync } = require('child_process');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
try {
|
||||
// Run semantic-release to get the next version number
|
||||
const dryRunOutput = execSync('npx semantic-release --dry-run').toString();
|
||||
const version = process.argv[2];
|
||||
|
||||
// Extract the version number from the semantic-release output
|
||||
const versionMatch = dryRunOutput.match(
|
||||
/The next release version is ([\S]+)/
|
||||
);
|
||||
if (!versionMatch) {
|
||||
throw new Error('Version number not found in semantic-release output');
|
||||
}
|
||||
const version = versionMatch[1];
|
||||
if (!version) throw Error('Must pass version on command line');
|
||||
|
||||
// Create version content
|
||||
const versionContent = `export const APP_VERSION = '${version}';\n`;
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
"lint": "eslint --ext .js,.ts,.vue ./",
|
||||
"format": "prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"dev": "npm run generate-version && quasar dev",
|
||||
"build": "npm run generate-version && quasar build"
|
||||
"dev": "npm run generate-version && quasar dev -m pwa",
|
||||
"build": "npm run generate-version && quasar build -m pwa"
|
||||
},
|
||||
"dependencies": {
|
||||
"@quasar/extras": "^1.16.11",
|
||||
|
||||
Reference in New Issue
Block a user