mirror of https://github.com/logseq/logseq
ci: refactor desktop app release ci, add nightly build
parent
5867e7d9ef
commit
fa003e6f57
|
@ -1,25 +1,35 @@
|
||||||
# This is a basic workflow to help you get started with Actions
|
# This is the main desktop application release workflow for both nightly and beta/stable releases.
|
||||||
|
|
||||||
name: Build-Desktop-Release
|
name: Build-Desktop-Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
tag-version:
|
build-target:
|
||||||
description: "Release Tag Version"
|
description: 'Build Target ("nightly"/"beta")'
|
||||||
|
type: string
|
||||||
required: true
|
required: true
|
||||||
|
default: "nightly"
|
||||||
git-ref:
|
git-ref:
|
||||||
description: "Release Git Ref"
|
description: "Release Git Ref"
|
||||||
required: true
|
required: true
|
||||||
default: "master"
|
default: "master"
|
||||||
is-draft:
|
is-draft:
|
||||||
description: 'Draft Release? '
|
description: 'Draft Release? '
|
||||||
|
type: boolean
|
||||||
required: true
|
required: true
|
||||||
default: "true"
|
default: true
|
||||||
is-pre-release:
|
is-pre-release:
|
||||||
description: 'Pre Release?'
|
description: 'Pre Release?'
|
||||||
|
type: boolean
|
||||||
required: true
|
required: true
|
||||||
default: "true"
|
default: true
|
||||||
|
schedule: # Every weekday at the noon (UTC) we run a scheduled nightly build
|
||||||
|
- cron: '0 12 * * MON-FRI'
|
||||||
|
|
||||||
|
env:
|
||||||
|
CLOJURE_VERSION: '1.10.1.763'
|
||||||
|
NODE_VERSION: '16'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
compile-cljs:
|
compile-cljs:
|
||||||
|
@ -31,67 +41,92 @@ jobs:
|
||||||
- name: Install Node.js, NPM and Yarn
|
- name: Install Node.js, NPM and Yarn
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
|
|
||||||
|
- name: Get yarn cache directory path
|
||||||
|
id: yarn-cache-dir-path
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
|
||||||
|
- name: Cache yarn cache directory
|
||||||
|
uses: actions/cache@v2
|
||||||
|
# use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||||
|
id: yarn-cache
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-yarn-
|
||||||
|
|
||||||
- name: Setup Java JDK
|
- name: Setup Java JDK
|
||||||
uses: actions/setup-java@v1.4.3
|
uses: actions/setup-java@v1.4.3
|
||||||
with:
|
with:
|
||||||
java-version: 1.8
|
java-version: 1.8
|
||||||
|
|
||||||
- name: Cache local Maven repository
|
- name: Cache clojure deps
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.m2/repository
|
path: |
|
||||||
key: ${{ runner.os }}-maven
|
~/.m2/repository
|
||||||
|
~/.gitlibs
|
||||||
|
key: ${{ runner.os }}-clojure-lib-${{ hashFiles('**/deps.edn') }}
|
||||||
|
|
||||||
- name: Install clojure
|
- name: Setup clojure
|
||||||
run: |
|
uses: DeLaGuardo/setup-clojure@3.5
|
||||||
curl -O https://download.clojure.org/install/linux-install-1.10.1.763.sh
|
with:
|
||||||
chmod +x linux-install-1.10.1.763.sh
|
cli: ${{ env.CLOJURE_VERSION }}
|
||||||
sudo ./linux-install-1.10.1.763.sh
|
|
||||||
|
|
||||||
- name: Compile CLJS
|
- name: Compile CLJS
|
||||||
run: yarn install && gulp build && yarn cljs:release-electron
|
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 APP Version
|
- name: Update APP Version
|
||||||
run: |
|
run: |
|
||||||
sed -i 's/"version": "0.0.1"/"version": "${{ github.event.inputs.tag-version }}"/g' ./package.json
|
sed -i 's/"version": "0.0.1"/"version": "${{ steps.ref.outputs.version }}"/g' ./package.json
|
||||||
working-directory: ./static
|
working-directory: ./static
|
||||||
|
|
||||||
- name: Display Package.json
|
- name: Display Package.json
|
||||||
run: cat ./package.json
|
run: cat ./package.json
|
||||||
working-directory: ./static
|
working-directory: ./static
|
||||||
|
|
||||||
|
- name: Save VERSION file
|
||||||
|
run: echo "${{ steps.ref.outputs.version }}" > ./VERSION
|
||||||
|
working-directory: ./static
|
||||||
|
|
||||||
- name: List Files
|
- name: List Files
|
||||||
run: ls -al
|
run: ls -al
|
||||||
working-directory: ./static
|
working-directory: ./static
|
||||||
|
|
||||||
- name: Compress Static Files
|
|
||||||
run: zip -r static.zip ./static
|
|
||||||
|
|
||||||
- name: Cache Static File
|
- name: Cache Static File
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: static.zip
|
name: static
|
||||||
path: static.zip
|
path: static
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
needs: [ compile-cljs ]
|
needs: [ compile-cljs ]
|
||||||
steps:
|
steps:
|
||||||
- name: Download The Static Asset
|
- name: Download The Static Asset
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: static.zip
|
name: static
|
||||||
path: ./
|
path: static
|
||||||
|
|
||||||
- name: Uncompress Static FIles
|
- name: Retrieve tag version
|
||||||
run: unzip static.zip
|
id: ref
|
||||||
|
run: |
|
||||||
|
pkgver=$(cat ./static/VERSION)
|
||||||
|
echo ::set-output name=version::$pkgver
|
||||||
|
|
||||||
- name: Install Node.js, NPM and Yarn
|
- name: Install Node.js, NPM and Yarn
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
|
|
||||||
# - name: Cache Node Modules
|
# - name: Cache Node Modules
|
||||||
# uses: actions/cache@v2
|
# uses: actions/cache@v2
|
||||||
|
@ -101,44 +136,43 @@ jobs:
|
||||||
# key: ${{ runner.os }}-node-modules
|
# key: ${{ runner.os }}-node-modules
|
||||||
|
|
||||||
- name: Build/Release Electron App
|
- name: Build/Release Electron App
|
||||||
run: yarn install && yarn electron:make
|
run: yarn install && yarn electron:make
|
||||||
working-directory: ./static
|
working-directory: ./static
|
||||||
|
|
||||||
- name: Change Artifact Name For ZIP File
|
- name: Save artifacts
|
||||||
run: mv static/out/make/zip/linux/x64/*-linux-x64-*.zip static/out/make/zip/linux/x64/Logseq-linux.zip
|
run: |
|
||||||
|
mkdir -p builds
|
||||||
|
# NOTE: save VERSION file to builds directory
|
||||||
|
cp static/VERSION ./builds/VERSION
|
||||||
|
mv static/out/make/*-*.AppImage ./builds/Logseq-linux-x64-${{ steps.ref.outputs.version }}.AppImage
|
||||||
|
mv static/out/make/zip/linux/x64/*-linux-x64-*.zip ./builds/Logseq-linux-x64-${{ steps.ref.outputs.version }}.zip
|
||||||
|
|
||||||
- name: Change Artifact Name For AppImage File
|
- name: Upload Artifact
|
||||||
run: mv static/out/make/*-*.AppImage static/out/make/Logseq-linux.AppImage
|
uses: actions/upload-artifact@v2
|
||||||
|
|
||||||
- name: Cache Artifact With ZIP format
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
with:
|
||||||
name: Logseq-linux.zip
|
name: logseq-linux-builds
|
||||||
path: static/out/make/zip/linux/x64/Logseq-linux.zip
|
path: builds
|
||||||
|
|
||||||
- name: Cache Artifact With AppImage format
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Logseq-linux.AppImage
|
|
||||||
path: static/out/make/Logseq-linux.AppImage
|
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: [ compile-cljs ]
|
needs: [ compile-cljs ]
|
||||||
steps:
|
steps:
|
||||||
- name: Download The Static Asset
|
- name: Download The Static Asset
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: static.zip
|
name: static
|
||||||
path: ./
|
path: static
|
||||||
|
|
||||||
- name: Uncompress Static FIles
|
- name: Retrieve tag version
|
||||||
run: unzip static.zip
|
id: ref
|
||||||
|
run: |
|
||||||
|
$env:PkgVer=$(cat ./static/VERSION)
|
||||||
|
echo "::set-output name=version::$env:PkgVer"
|
||||||
|
|
||||||
- name: Install Node.js, NPM and Yarn
|
- name: Install Node.js, NPM and Yarn
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
|
|
||||||
# - name: Cache Node Modules
|
# - name: Cache Node Modules
|
||||||
# uses: actions/cache@v2
|
# uses: actions/cache@v2
|
||||||
|
@ -162,18 +196,16 @@ jobs:
|
||||||
CSC_LINK: ${{ secrets.CSC_LINK }}
|
CSC_LINK: ${{ secrets.CSC_LINK }}
|
||||||
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
||||||
|
|
||||||
- name: Change Artifact Name
|
- name: Save Artifact
|
||||||
run: Get-ChildItem static\out\make\squirrel.windows\x64\*.exe | Rename-Item -NewName Logseq-win64.exe
|
run: |
|
||||||
|
mkdir builds
|
||||||
|
mv static\out\make\squirrel.windows\x64\*.exe builds\Logseq-win-x64-${{ steps.ref.outputs.version }}.exe
|
||||||
|
|
||||||
- name: List Directory
|
- name: Upload Artifact
|
||||||
run: dir
|
uses: actions/upload-artifact@v2
|
||||||
working-directory: static/out/make/squirrel.windows/x64/
|
|
||||||
|
|
||||||
- name: Cache Artifact
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
with:
|
||||||
name: Logseq-win64.exe
|
name: logseq-win64-builds
|
||||||
path: static/out/make/squirrel.windows/x64/Logseq-win64.exe
|
path: builds
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
needs: [ compile-cljs ]
|
needs: [ compile-cljs ]
|
||||||
|
@ -181,13 +213,16 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download The Static Asset
|
- name: Download The Static Asset
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: static.zip
|
name: static
|
||||||
path: ./
|
path: static
|
||||||
|
|
||||||
- name: Uncompress Static Files
|
- name: Retrieve tag version
|
||||||
run: unzip ./static.zip
|
id: ref
|
||||||
|
run: |
|
||||||
|
pkgver=$(cat ./static/VERSION)
|
||||||
|
echo ::set-output name=version::$pkgver
|
||||||
|
|
||||||
- name: List Static Files
|
- name: List Static Files
|
||||||
run: ls -al ./static
|
run: ls -al ./static
|
||||||
|
@ -195,7 +230,19 @@ jobs:
|
||||||
- name: Install Node.js, NPM and Yarn
|
- name: Install Node.js, NPM and Yarn
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
|
|
||||||
|
- name: Get yarn cache directory path
|
||||||
|
id: yarn-cache-dir-path
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
- name: Cache yarn cache directory
|
||||||
|
uses: actions/cache@v2
|
||||||
|
id: yarn-cache
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-yarn-
|
||||||
|
|
||||||
- name: Signing By Apple Developer ID
|
- name: Signing By Apple Developer ID
|
||||||
uses: apple-actions/import-codesign-certs@v1
|
uses: apple-actions/import-codesign-certs@v1
|
||||||
|
@ -210,244 +257,92 @@ jobs:
|
||||||
# **/node_modules
|
# **/node_modules
|
||||||
# key: ${{ runner.os }}-node-modules
|
# key: ${{ runner.os }}-node-modules
|
||||||
|
|
||||||
- name: Build/Release Electron App
|
- name: Build/Release Electron App for x64
|
||||||
run: yarn install && yarn electron:make
|
run: yarn install && yarn electron:make
|
||||||
working-directory: ./static
|
working-directory: ./static
|
||||||
env:
|
env:
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID_EMAIL }}
|
APPLE_ID: ${{ secrets.APPLE_ID_EMAIL }}
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
|
||||||
- name: Change DMG Name
|
- name: Save x64 artifacts
|
||||||
run: mv static/out/make/*.dmg static/out/make/logseq-darwin-x64-${{ github.event.inputs.tag-version }}.dmg
|
|
||||||
|
|
||||||
- name: Cache Artifact DMG
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Logseq-x64.dmg
|
|
||||||
path: static/out/make/logseq-darwin-x64-${{ github.event.inputs.tag-version }}.dmg
|
|
||||||
|
|
||||||
- name: ls files
|
|
||||||
run: du -a static/out/
|
|
||||||
|
|
||||||
- name: Change zip Name
|
|
||||||
run: mv static/out/make/zip/darwin/x64/*.zip static/out/make/zip/darwin/x64/logseq-darwin-x64-${{ github.event.inputs.tag-version }}.zip
|
|
||||||
|
|
||||||
- name: Cache Artifact ZIP
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Logseq-x64.zip
|
|
||||||
path: static/out/make/zip/darwin/x64/logseq-darwin-x64-${{ github.event.inputs.tag-version }}.zip
|
|
||||||
|
|
||||||
build-macos-arm64:
|
|
||||||
needs: [ compile-cljs ]
|
|
||||||
runs-on: macos-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# this is only needed temporarily
|
|
||||||
# wait until macos-11 GA https://github.com/actions/virtual-environments/issues/2486
|
|
||||||
# or m1 hardware https://github.com/actions/virtual-environments/issues/2187
|
|
||||||
- name: hack osx sdk
|
|
||||||
run: |
|
run: |
|
||||||
if [ "$(sw_vers -productVersion | cut -d'.' -f1)" = 10 ]; then
|
mkdir -p builds
|
||||||
pushd /Library/Developer/CommandLineTools/SDKs
|
mv static/out/make/Logseq.dmg ./builds/Logseq-darwin-x64-${{ steps.ref.outputs.version }}.dmg
|
||||||
sudo rm MacOSX.sdk
|
mv static/out/make/zip/darwin/x64/*.zip ./builds/Logseq-darwin-x64-${{ steps.ref.outputs.version }}.zip
|
||||||
sudo ln -s MacOSX11.1.sdk MacOSX.sdk
|
|
||||||
sudo rm -rf MacOSX10.15.sdk
|
|
||||||
ls -l
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
- name: Download The Static Asset
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: static.zip
|
|
||||||
path: ./
|
|
||||||
|
|
||||||
- name: Uncompress Static Files
|
- name: Build/Release Electron App for arm64
|
||||||
run: unzip ./static.zip
|
|
||||||
|
|
||||||
- name: List Static Files
|
|
||||||
run: ls -al ./static
|
|
||||||
|
|
||||||
- name: Install Node.js, NPM and Yarn
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
- name: Signing By Apple Developer ID
|
|
||||||
uses: apple-actions/import-codesign-certs@v1
|
|
||||||
with:
|
|
||||||
p12-file-base64: ${{ secrets.APPLE_CERTIFICATES_P12 }}
|
|
||||||
p12-password: ${{ secrets.APPLE_CERTIFICATES_P12_PASSWORD }}
|
|
||||||
|
|
||||||
# - name: Cache Node Modules
|
|
||||||
# uses: actions/cache@v2
|
|
||||||
# with:
|
|
||||||
# path: |
|
|
||||||
# **/node_modules
|
|
||||||
# key: ${{ runner.os }}-node-modules
|
|
||||||
|
|
||||||
- name: Build/Release Electron App
|
|
||||||
run: yarn install && yarn electron:make-macos-arm64
|
run: yarn install && yarn electron:make-macos-arm64
|
||||||
working-directory: ./static
|
working-directory: ./static
|
||||||
env:
|
env:
|
||||||
APPLE_ID: ${{ secrets.APPLE_ID_EMAIL }}
|
APPLE_ID: ${{ secrets.APPLE_ID_EMAIL }}
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
|
||||||
- name: Change DMG Name
|
- name: Save arm64 artifacts
|
||||||
run: mv static/out/make/*.dmg static/out/make/logseq-darwin-arm64-${{ github.event.inputs.tag-version }}.dmg
|
run: |
|
||||||
|
mv static/out/make/Logseq.dmg ./builds/Logseq-darwin-arm64-${{ steps.ref.outputs.version }}.dmg
|
||||||
|
mv static/out/make/zip/darwin/arm64/*.zip ./builds/Logseq-darwin-arm64-${{ steps.ref.outputs.version }}.zip
|
||||||
|
|
||||||
- name: Cache Artifact DMG
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Logseq-arm64.dmg
|
name: logseq-darwin-builds
|
||||||
path: static/out/make/logseq-darwin-arm64-${{ github.event.inputs.tag-version }}.dmg
|
path: builds
|
||||||
|
|
||||||
- name: ls files
|
|
||||||
run: du -a static/out/
|
|
||||||
|
|
||||||
- name: Change zip Name
|
|
||||||
run: mv static/out/make/zip/darwin/arm64/*.zip static/out/make/zip/darwin/arm64/logseq-darwin-arm64-${{ github.event.inputs.tag-version }}.zip
|
|
||||||
|
|
||||||
- name: Cache Artifact ZIP
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Logseq-arm64.zip
|
|
||||||
path: static/out/make/zip/darwin/arm64/logseq-darwin-arm64-${{ github.event.inputs.tag-version }}.zip
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [ build-macos, build-linux, build-windows, build-macos-arm64 ]
|
# NOTE: For now, we only have beta channel to be released on Github
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.build-target == 'beta') }}
|
||||||
|
needs: [ build-macos, build-linux, build-windows ]
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download The MacOS X64 DMG Artifact
|
- name: Download MacOS Artifacts
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Logseq-x64.dmg
|
name: logseq-darwin-builds
|
||||||
path: ./
|
path: ./
|
||||||
|
|
||||||
- name: Download The MacOS X64 ZIP Artifact
|
- name: Download The Linux Artifacts
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Logseq-x64.zip
|
name: logseq-linux-builds
|
||||||
path: ./
|
|
||||||
|
|
||||||
- name: Download The MacOS ARM64 DMG Artifact
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Logseq-arm64.dmg
|
|
||||||
path: ./
|
|
||||||
|
|
||||||
- name: Download The MacOS ARM64 ZIP Artifact
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Logseq-arm64.zip
|
|
||||||
path: ./
|
|
||||||
|
|
||||||
- name: Download The Linux Artifact In Zip format
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Logseq-linux.zip
|
|
||||||
path: ./
|
|
||||||
|
|
||||||
- name: Download The Linux Artifact In AppImage format
|
|
||||||
uses: actions/download-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Logseq-linux.AppImage
|
|
||||||
path: ./
|
path: ./
|
||||||
|
|
||||||
- name: Download The Windows Artifact
|
- name: Download The Windows Artifact
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Logseq-win64.exe
|
name: logseq-win64-builds
|
||||||
path: ./
|
path: ./
|
||||||
|
|
||||||
- name: List files
|
- name: List files
|
||||||
run: ls -rl
|
run: ls -rl
|
||||||
|
|
||||||
|
- name: Retrieve tag version
|
||||||
|
id: ref
|
||||||
|
run: |
|
||||||
|
pkgver=$(cat VERSION)
|
||||||
|
echo ::set-output name=version::$pkgver
|
||||||
|
|
||||||
|
- name: Generate SHA256 checksums
|
||||||
|
run: |
|
||||||
|
sha256sum *-darwin-* > SHA256SUMS.txt
|
||||||
|
sha256sum *-win-* >> SHA256SUMS.txt
|
||||||
|
sha256sum *-linux-* >> SHA256SUMS.txt
|
||||||
|
cat SHA256SUMS.txt
|
||||||
|
|
||||||
- name: Create Release Draft
|
- name: Create Release Draft
|
||||||
id: create_release
|
uses: softprops/action-gh-release@v1
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ github.event.inputs.tag-version }}
|
tag_name: ${{ steps.ref.outputs.version }}
|
||||||
release_name: Desktop APP ${{ github.event.inputs.tag-version }} (Beta Testing)
|
name: Desktop APP ${{ steps.ref.outputs.version }} (Beta Testing)
|
||||||
|
body: "TODO: Fill this changelog. Sorry for the inconvenience!"
|
||||||
draft: ${{ github.event.inputs.is-draft }}
|
draft: ${{ github.event.inputs.is-draft }}
|
||||||
prerelease: ${{ github.event.inputs.is-pre-release }}
|
prerelease: ${{ github.event.inputs.is-pre-release }}
|
||||||
|
files: |
|
||||||
|
./VERSION
|
||||||
|
./SHA256SUMS.txt
|
||||||
|
./*.zip
|
||||||
|
./*.dmg
|
||||||
|
./*.exe
|
||||||
|
./*.AppImage
|
||||||
|
|
||||||
- name: Upload MacOS X64 ZIP Artifact
|
|
||||||
id: upload-macos-x64-zip-artifact
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./logseq-darwin-x64-${{ github.event.inputs.tag-version }}.zip
|
|
||||||
asset_name: logseq-darwin-x64-${{ github.event.inputs.tag-version }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
||||||
- name: Upload MacOS X64 DMG Artifact
|
|
||||||
id: upload-macos-x64-dmg-artifact
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./logseq-darwin-x64-${{ github.event.inputs.tag-version }}.dmg
|
|
||||||
asset_name: logseq-darwin-x64-${{ github.event.inputs.tag-version }}.dmg
|
|
||||||
asset_content_type: application/x-apple-diskimage
|
|
||||||
|
|
||||||
- name: Upload MacOS ARM64 ZIP Artifact
|
|
||||||
id: upload-macos-arm64-zip-artifact
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./logseq-darwin-arm64-${{ github.event.inputs.tag-version }}.zip
|
|
||||||
asset_name: logseq-darwin-arm64-${{ github.event.inputs.tag-version }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
||||||
- name: Upload MacOS ARM64 DMG Artifact
|
|
||||||
id: upload-macos-arm64-dmg-artifact
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./logseq-darwin-arm64-${{ github.event.inputs.tag-version }}.dmg
|
|
||||||
asset_name: logseq-darwin-arm64-${{ github.event.inputs.tag-version }}.dmg
|
|
||||||
asset_content_type: application/x-apple-diskimage
|
|
||||||
|
|
||||||
- name: Upload Linux Artifact With Zip format
|
|
||||||
id: upload-linux-artifact-with-zip-format
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./Logseq-linux.zip
|
|
||||||
asset_name: logseq-linux-x64-${{ github.event.inputs.tag-version }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
||||||
- name: Upload Linux Artifact With AppImage format
|
|
||||||
id: upload-linux-artifact-with-appimage-format
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./Logseq-linux.AppImage
|
|
||||||
asset_name: logseq-linux-x64-${{ github.event.inputs.tag-version }}.AppImage
|
|
||||||
asset_content_type: application/octet-stream
|
|
||||||
|
|
||||||
- name: Upload Windows Artifact
|
|
||||||
id: upload-win-artifact
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./Logseq-win64.exe
|
|
||||||
asset_name: logseq-win-x64-${{ github.event.inputs.tag-version }}.exe
|
|
||||||
asset_content_type: application/octet-stream
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "logseq",
|
"name": "logseq",
|
||||||
"version": "0.0.1",
|
"version": "0.5.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "static/electron.js",
|
"main": "static/electron.js",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
// This script file outputs the version in the package.json of project dir,
|
||||||
|
// and optionally add nightly postfix.
|
||||||
|
//
|
||||||
|
// It is used as a helper by the continuous integration.
|
||||||
|
const path = require('path')
|
||||||
|
const process = require('process')
|
||||||
|
|
||||||
|
const ver = require(path.join(__dirname, '../package.json')).version
|
||||||
|
|
||||||
|
if (process.argv[2] === 'nightly') {
|
||||||
|
const today = new Date()
|
||||||
|
console.log(
|
||||||
|
ver + '+nightly.' + today.toISOString().split('T')[0].replaceAll('-', '')
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
console.log(ver)
|
||||||
|
}
|
Loading…
Reference in New Issue