diff --git a/.github/workflows/release.ylm b/.github/workflows/release.ylm new file mode 100644 index 0000000..b7a90d3 --- /dev/null +++ b/.github/workflows/release.ylm @@ -0,0 +1,33 @@ +name: Build/release + +on: + push: + branches: + - release + +jobs: + release: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] +# os: [macos-latest] +# os: [ubuntu-latest, windows-latest] +# os: [windows-latest] + + steps: + - name: Check out Git repository + uses: actions/checkout@v1 + - name: Setup Node.js + uses: actions/setup-node@master + with: + node-version: 14.16 + - name: Install dependencies + run: npm install + - name: see directory with dependencies + run: ls + - name: Deploy Releases + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npm run deploy diff --git a/README.md b/README.md index bfaf3c3..24d505d 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ [![master](https://img.shields.io/badge/master-stable-green.svg?maxAge=2592000)]('') ![Maintenance](https://img.shields.io/badge/Maintained-Yes-green.svg) [![CodeQL](https://github.com/WebTools-NG/WebTools-NG/workflows/CodeQL/badge.svg)](https://github.com/WebTools-NG/WebTools-NG/actions?query=workflow%3ACodeQL) +[![Build/release](https://github.com/WebTools-NG/WebTools-NG/actions/workflows/build.yml/badge.svg?branch=release)](https://github.com/WebTools-NG/WebTools-NG/actions/workflows/build.yml) NOTE: This is currently in **BETA** diff --git a/package.json b/package.json index 2facaae..009d276 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,9 @@ "build": "run-script-os", "build:darwin:linux": "chmod +x script/getGitVer.sh && . script/getGitVer.sh && vue-cli-service electron:build && unset AppRev", "build:win32": "script\\getGitVer.cmd && vue-cli-service electron:build", + "deploy": "run-script-os", + "deploy:win32": "script\\getGitVer.cmd && vue-cli-service electron:build --publish always", + "deploy:darwin:linux": "chmod +x script/getGitVer.sh && . script/getGitVer.sh && vue-cli-service electron:build --publish always && unset AppRev", "lint": "vue-cli-service lint", "i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'", "postinstall": "electron-builder install-app-deps", diff --git a/script/release.sh b/script/release.sh new file mode 100644 index 0000000..bc4fec3 --- /dev/null +++ b/script/release.sh @@ -0,0 +1,22 @@ +# Release from master into a draft release + +# Get current branch +CURBRANCH=$(git rev-parse --abbrev-ref HEAD) +echo $CURBRANCH +# Checkout Master Branch +git checkout master +# Make sure Master Branch locally is updated +git pull +# Checkout Release Branch +git checkout release +# Update Release Branch from Master +git merge master +# Get current version +CURVER=$(cat package.json|grep -oP '(?<="version": ")[^"]*') +echo $CURVER +# Commit to Release Branch +git commit -am v$CURVER +# Tag Release Branch +git tag v$CURVER +# Upload and trigger a release +git push && git push --tags diff --git a/vue.config.js b/vue.config.js index ef717b2..0475b19 100644 --- a/vue.config.js +++ b/vue.config.js @@ -9,12 +9,12 @@ module.exports = { enableInSFC: false }, electronBuilder: { - builderOptions: { + builderOptions: { appId: "com.webtools.webtools-ng", artifactName: "${productName}-${version}.${env.AppRev}.${ext}", directories: { "buildResources": "src/assets" - }, + }, "extraResources": [ { "from": "./public/locales", @@ -36,8 +36,13 @@ module.exports = { mac: { icon: './src/assets/WebTools-512.icns', target: 'dmg' + }, + "nsis": { + "differentialPackage": false + }, + "dmg": { + "writeUpdateInfo": false } - } } }