ci: use version.cljs instead

This commit is contained in:
Andelf
2021-11-28 10:01:06 +08:00
committed by Tienson Qin
parent fa003e6f57
commit 935a317c6e
3 changed files with 26 additions and 10 deletions

View File

@@ -24,7 +24,7 @@ on:
type: boolean
required: true
default: true
schedule: # Every weekday at the noon (UTC) we run a scheduled nightly build
schedule: # Every workday at the noon (UTC) we run a scheduled nightly build
- cron: '0 12 * * MON-FRI'
env:
@@ -75,15 +75,20 @@ jobs:
with:
cli: ${{ env.CLOJURE_VERSION }}
- name: Compile CLJS
run: yarn install && gulp build && yarn cljs:release-electron
- name: Retrieve tag version
id: ref
run: |
pkgver=$(node ./scripts/get-pkg-version.js "${{ github.event.inputs.build-target }}")
echo ::set-output name=version::$pkgver
- name: Update Nightly APP Version
if: ${{ github.event.inputs.build-target == 'nightly' }}
run: |
sed -i 's/defonce version ".*"/defonce version "${{ steps.ref.outputs.version }}"/g' src/main/frontend/version.cljs
- name: Compile CLJS
run: yarn install && gulp build && yarn cljs:release-electron
- name: Update APP Version
run: |
sed -i 's/"version": "0.0.1"/"version": "${{ steps.ref.outputs.version }}"/g' ./package.json