参照相关文档,在package.json中配置electron-builder的基础打包设置:
"build": { "productName": "Fishing Funds", "appId": "com.electron.1zilc.fishing-funds", "copyright": "Copyright © 2021 1zilc", "files": [ "dist/", "node_modules/", "index.html", "main.prod.js", "main.prod.js.map", "package.json" ], "afterSign": ".erb/scripts/Notarize.js", "mac": { "target": [ "dmg" ], "type": "distribution", "hardenedRuntime": true, "entitlements": "assets/entitlements.mac.plist", "entitlementsInherit": "assets/entitlements.mac.plist", "gatekeeperAssess": false }, "dmg": { "contents": [ { "x": 130, "y": 220 }, { "x": 410, "y": 220, "type": "link", "path": "/Applications" } ] }, "win": { "target": [ "nsis" ] }, "linux": { "target": [ "AppImage" ], "category": "Development" }, "directories": { "app": "src", "buildResources": "assets", "output": "release" }, "extraResources": [ "./assets/**" ] },
在该配置的基础上添加 publish key,如下:
"publish": { "provider": "github", "owner": "1zilc", "repo": "fishing-funds" }
以我自己的 Fishing Funds 为例
添加github token,网址如下: https://github.com/settings/tokens/new

勾选repo仓库相关权限
生成token后,临时添加环境变量中
export GH_TOKEN="<YOUR_TOKEN_HERE>"
在package.json中编写scripts,根据实际情况做调整
"scripts": { "build": "concurrently \"yarn build:main\" \"yarn build:renderer\"", "build:main": "cross-env NODE_ENV=production webpack --config ./.erb/configs/webpack.config.main.prod.babel.js", "build:renderer": "cross-env NODE_ENV=production webpack --config ./.erb/configs/webpack.config.renderer.prod.babel.js", "package": "rm -rf src/dist && yarn build && electron-builder build --publish never", "package-mac": "rm -rf src/dist && yarn build && electron-builder build --mac -p always", "package-linux": "rm -rf src/dist && yarn build && electron-builder build --linux", "package-win": "rm -rf src/dist && yarn build && electron-builder build --win --x64", "package-all": "rm -rf src/dist && yarn build && electron-builder build -mwl", "release-all": "rm -rf src/dist && yarn build && electron-builder build -mwl --publish always" },
# 添加发布参数即release-all中所写 electron-builder build --publish always
执行
yarn release-all

构建完成后会自动通过刚才设置的token去调github的发布接口,此时仓库中会自动生成一个草稿状态的release,在填写相关日志后即可进行版本发布
electron-builder 自动发布 github release 到此完成! 🙂
I visited several sites but the audio feature for audio songs current at this site is in fact fabulous.
I have been surfing online more than three hours today, yet I
never found any interesting article like yours.
It is pretty worth enough for me. In my opinion,
if all website owners and bloggers made good content as you did, the
internet will be much more useful than ever before.
Incredible story there. What happened after? Thanks!
Hi there, I want to subscribe for this blog to obtain latest updates, so where can i
do it please help out.
What’s up to all, since I am genuinely eager of reading this webpage’s post to be updated regularly.
It contains good stuff.
Keep this going please, great job!
After looking at a number of the articles on your website, I seriously
like your way of writing a blog. I saved as a favorite it to my bookmark webpage list and will be checking back soon. Please check
out my website as well and let me know how you feel.
Peculiar article, just what I wanted to find.
Hmm is anyone else encountering problems with the images on this blog loading?
I’m trying to figure out if its a problem on my end or if it’s the blog.
Any suggestions would be greatly appreciated.
magnificent points altogether, you simply won a new reader.
What might you recommend in regards to your submit that you just made a few days
in the past? Any positive?
Hi to all, how is all, I think every one is getting more from this web page, and your views are good designed for new
users.
My partner and I absolutely love your blog and find most of your post’s to
be exactly I’m looking for. Do you offer guest writers to write content available for you?
I wouldn’t mind producing a post or elaborating on a few
of the subjects you write about here. Again, awesome web site!
continuously i used to read smaller posts which also
clear their motive, and that is also happening with this
article which I am reading here.
Thanks for the auspicious writeup. It in truth was once a enjoyment account it.
Glance complicated to far introduced agreeable from you! By the way, how can we keep in touch?
It’s yes nearly impossible to find knowledgeabfle people on this subjecjt, hobwever,
ytou souand like you knosw what you’re talking about! Thanks
WOW just what I was searching for. Came here by searching
for takipçi satın al
Greetings, I do believe your web site could be having browser compatibility problems.
When I take a look at your site in Safari, it looks fine however, when opening in I.E., it
has some overlapping issues. I merely wanted to give you a quick heads up!
Other than that, wonderful blog!
When someone writes an paragraph he/she maintains the thought of a user in his/her brain that how a user can understand
it. So that’s why this post is outstdanding. Thanks!
I know this if off topic but I’m looking into starting my own weblog and was wondering what all is required to get setup?
I’m assuming having a blog like yours would cost a pretty penny?
I’m not very web savvy so I’m not 100% positive.
Any suggestions or advice would be greatly appreciated.
Thank you
I’m curious to find out what blog system you have been utilizing?
I’m experiencing some minor security issues with
my latest site and I’d like to find something more
safe. Do you have any recommendations?
I love looking through an article that can make men and women think.
Also, thanks for allowing me to comment!
You are so interesting! I do not believe I’ve read through a single thing like this before.
So wonderful to discover someone with genuine thoughts on this subject matter.
Seriously.. thank you for starting this up.
This website is one thing that’s needed on the web, someone with a little originality!
What i do not understood is in truth how you’re not really a
lot more well-favored than you might be right now.
You’re very intelligent. You understand therefore considerably on the subject of this topic, made
me for my part imagine it from so many various angles.
Its like women and men aren’t involved except it is something to
accomplish with Woman gaga! Your personal stuffs nice.
All the time take care of it up!
You could definitely see your enthusiasm in the work you write.
The sector hopes for even more passionate writers such as you who
aren’t afraid to say how they believe. At all times go after your heart.
This website was… how do I say it? Relevant!!
Finally I’ve found something that helped me. Thanks!
What’s up everyone, it’s my first go to see at this website, and article
is genuinely fruitful in favor of me, keep up posting such articles.
Thanks for sharing your info. I really appreciate your efforts and
I will be waiting for your further write ups thanks once again.
Good response in return of this query with solid
arguments and describing everything regarding that.
Excellent way of explaining, and good piece of writing to obtain data regarding my presentation focus,
which i am going to convey in academy.
What’s Taking place i am new to this, I stumbled upon this I’ve
found It positively useful and it has helped me out loads.
I hope to give a contribution & aid different users like its
helped me. Good job.
It’s actually a cool and helpful piece of information. I am happy that you just shared
this helpful info with us. Please keep us up to date like this.
Thanks for sharing.
Whats up very cool site!! Man .. Excellent .. Wonderful
.. I will bookmark your web site and take the feeds additionally?
I’m satisfied to find so many helpful info right here within the post, we need develop more techniques
on this regard, thanks for sharing. . . . . .
What’s up colleagues, how is the whole thing, and what you would like to say on the topic of this paragraph,
in my view its in fact amazing designed for me.
Howdy! I understand this is sort of off-topic but I
needed to ask. Does running a well-established website such as yours take a large amount
of work? I’m completely new to writing a blog but I do write in my journal every day.
I’d like to start a blog so I will be able to share my experience and feelings online.
Please let me know if you have any kind of recommendations or
tips for brand new aspiring blog owners.
Thankyou!
What i do not realize is actually how you are now not really a
lot more smartly-favored than you might be right now.
You are very intelligent. You already know thus significantly on the subject of this
subject, made me individually believe it from numerous various angles.
Its like men and women are not involved except it is something to do with Woman gaga!
Your personal stuffs outstanding. At all times handle it up!
I do not know whether it’s just me or if everybody else experiencing
issues with your site. It seems like some of the written text in your posts are running off the screen.
Can somebody else please comment and let me know if this is happening to them too?
This might be a problem with my web browser because I’ve had
this happen before. Many thanks
I love your blog.. very nice colors & theme. Did
you design this website yourself or did you hire someone to do it
for you? Plz answer back as I’m looking to create my own blog and would like to find out
where u got this from. thanks
Thanks for ones marvelous posting! I actually enjoyed reading it, you can be a great author.I will remember to bookmark your blog
and will eventually come back at some point.
I want to encourage you to ultimately continue
your great job, have a nice day!
Hi everyone, it’s my first visit at this web site, and piece of writing is actually fruitful for
me, keep up posting these posts.
Hi, I believe your blog could possibly be having internet browser
compatibility issues. When I look at your web site in Safari, it looks fine but when opening in I.E.,
it’s got some overlapping issues. I merely wanted to provide you with a quick heads
up! Apart from that, excellent site!
After going over a few of the blog posts on your site, I honestly appreciate your technique of writing a blog.
I book marked it to my bookmark website list and will be
checking back in the near future. Please visit my web site as well and tell me
what you think.
Hi there just wanted to give you a quick heads up. The words in your
post seem to be running off the screen in Ie. I’m not sure if this is a format issue or
something to do with internet browser compatibility but I thought
I’d post to let you know. The layout look great though!
Hope you get the problem solved soon. Kudos
I used to be suggested this website by way of my cousin. I am now not positive whether this submit is written through him as nobody else realize such distinct about my difficulty.
You are wonderful! Thank you!
Way cool! Some very valid points! I appreciate you writing this post and also the rest of the website is also really good.
What’s up, everything is going well here and ofcourse every one is sharing facts, that’s actually
good, keep up writing.
I’m really enjoying the design and layout of your website. It’s a very easy on the
eyes which makes it much more pleasant for me to come here
and visit more often. Did you hire out a designer to create your theme?
Exceptional work!
I think this is one of the most important information for
me. And i am glad reading your article. But want to remark on some general things, The site style is perfect, the articles is really
nice : D. Good job, cheers
I’m impressed, I have to admit. Seldom do I encounter a blog that’s both
equally educative and interesting, and let me tell you,
you have hit the nail on the head. The problem is something that not enough folks are speaking
intelligently about. Now i’m very happy I came across this in my
hunt for something concerning this.
It’s really very complex in this active life to listen news on Television, thus I only use
world wide web for that reason, and get the hottest news.
Why viewers still make use of to read news papers when in this technological globe everything is existing on net?