导航
导航
文章目录
  1. 一、前言
  2. 二、Github Action配置分享
  3. 三、最后

分享一个rdm编译打包的github Action配置

一、前言

​ 如果每次更新都要重新打包的话,难免会觉得麻烦,毕竟整个环境下来也要占用空几个G.对于我这种mac 乞丐版,心里有点接受不了.于是何不借助与github action 来打包呢,又不要钱.白嫖的即是最好的.

二、Github Action配置分享

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: macos-10.14

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2.2.0
with:
repository: uglide/RedisDesktopManager
path: rdm
submodules: 'recursive'
ref: 2020.1
# install python3
- name: install Python3
uses: actions/setup-python@v2
with:
python-version: '3.x'
# pip install
- name: pip install
uses: BSFishy/pip-action@v1
with:
requirements: rdm/src/py/requirements.txt
upgrade: true
# install xcode
#- name: install xcode
# uses: sinoru/actions-setup-xcode@v1.1
# with:
# xcode-version: '10.0'
# install QT
- name: install QT
uses: jurplel/install-qt-action@v2.6.3
with:
modules: 'qtcharts'
version: '5.13.2'
# Runs a single command using the runners shell
- name: build
run: |
sudo xcode-select -s /Applications/Xcode_10.3.app/Contents/Developer
cd rdm/src/resources/
cp Info.plist.sample Info.plist
sed -i '.back' 's/0.0.0/2020.1/g' Info.plist
cd $GITHUB_WORKSPACE/rdm/src
sed -i '.back' 's/^\(\s*\)VERSION=.*/\1VERSION=2020.1/g' rdm.pro
mkdir -p $GITHUB_WORKSPACE/rdm/bin/osx/release
touch $GITHUB_WORKSPACE/rdm/bin/osx/release/setup.cfg
cd $GITHUB_WORKSPACE/rdm/bin/osx/release/
echo '[install]\nprefix=' > setup.cfg
cd $GITHUB_WORKSPACE/rdm/src
sed -i '.back' 's/initUpdater();/\/\/initUpdater();/g' ./app/app.cpp
qmake CONFIG-=debug CONFIG+=sdk_no_version_check
make -s -j 8
cd $GITHUB_WORKSPACE/rdm/bin/osx/release
macdeployqt Redis\ Desktop\ Manager.app -qmldir=../../../src/qml
macdeployqt Redis\ Desktop\ Manager.app -qmldir=../../../src/qml -dmg
mv Redis\ Desktop\ Manager.dmg rdm.dmg
- name: create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
tag_name: 'v2020.1'
release_name: 'v2020.1-ci'
body: |
V2020.1-CI
- Build-in Pickle formatter now recognizes numpy.array, pandas.DataFrame and pandas.Series
- Value now can be saved as file
draft: false
prerelease: false
- name: upload a release Asset
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./rdm/bin/osx/release/rdm.dmg
asset_name: rdm.dmg
asset_content_type: application/dmg

​ 以上配置经过修修改改,勉强能用,希望能给各位路过的大佬参考一下.如果要下载打包好的dmg文件可以去https://github.com/onewe/RedisDesktopManager-Mac这里下载.

三、最后

​ 如果有小伙伴有兴趣弄windows的action 请带上我.🙏🏻️

支持一下
扫一扫,请我吃颗大白兔奶糖
  • 支付宝扫一扫