参照相关文档,在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 到此完成! 🙂
Hi there to every one, the contents existing at this web
site are in fact amazing for people knowledge, well, keep up the nice work fellows.
I’m no longer certain where you are getting your info,
but good topic. I needs to spend some time learning more or figuring out more.
Thanks for excellent info I was looking for this info for my mission.
Heya i’m for the primary time here. I came across this board and I to find It truly useful &
it helped me out much. I’m hoping to give one thing again and
help others like you aided me.
It’s actually a cool and helpful piece of information. I am happy that you
simply shared this useful information with us.
Please keep us up to date like this. Thanks for sharing.
Every weekend i used to pay a visit this web page, as
i want enjoyment, since this this web page conations truly
nice funny material too.
Thanks for sharing your thoughts about Pay check stubs.
Regards
Hello, I think your site might be having web browser compatibility issues.
When I take a look at your website in Safari, it looks fine however, when opening in IE,
it has some overlapping issues. I just wanted to give you a quick heads up!
Apart from that, fantastic blog!
Hey there! I’ve been following your web site for a long time
now and finally got the bravery to go ahead
and give you a shout out from Atascocita Tx! Just wanted
to say keep up the good work!
Appreciate the recommendation. Will try it
out.
Admiring the dedication you put into your site and detailed information you present.
It’s nice to come across a blog every once in a while that isn’t
the same outdated rehashed material. Great read! I’ve saved
your site and I’m including your RSS feeds to my Google
account.
Have you ever considered creating an ebook or guest authoring
on other websites? I have a blog based upon on the same information you discuss
and would love to have you share some stories/information. I know my viewers would value your work.
If you’re even remotely interested, feel free to shoot
me an email.
We’re a group of volunteers and starting a new scheme in our community.
Your site provided us with valuable info to work on. You
have done an impressive job and our whole community will be grateful to you.
Greetings from Idaho! I’m bored to tears at work so I decided to check out your blog on my iphone during lunch break.
I really like the knowledge you present here and can’t wait to take a look when I get home.
I’m amazed at how fast your blog loaded on my cell phone ..
I’m not even using WIFI, just 3G .. Anyhow, great site!
Your method of telling all in this piece of writing is really nice, all can easily understand it, Thanks a lot.
I’m truly 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?
Great work!
This paragraph provides clear idea in favor of the new users of blogging, that
truly how to do running a blog.
I’m not sure why but this site is loading extremely slow for me.
Is anyone else having this problem or is it a issue on my end?
I’ll check back later on and see if the problem still exists.
You actually make it seem so easy with your presentation but I in finding
this topic to be really one thing which I believe I would by no means understand.
It kind of feels too complex and extremely vast for me.
I am looking forward on your next put up, I will attempt to get
the grasp of it!
Thank you for the auspicious writeup. It actually
was a amusement account it. Glance advanced to more introduced agreeable from you!
However, how can we keep in touch?
Woah! I’m really enjoying the template/theme of this site.
It’s simple, yet effective. A lot of times it’s challenging to get that “perfect balance” between user friendliness and visual appearance.
I must say you have done a awesome job with this. Also, the blog loads extremely quick for me
on Chrome. Excellent Blog!
This article is actually a good one it helps new internet viewers, who
are wishing for blogging.
Hey there would you mind letting me know which hosting company you’re
working with? I’ve loaded your blog in 3 completely different web browsers and I
must say this blog loads a lot quicker then most. Can you recommend
a good hosting provider at a reasonable price? Cheers, I appreciate it!
What’s up to every one, the contents existing at this web site are genuinely awesome for people experience, well, keep up the nice work fellows.
Hey There. I discovered your weblog the usage of msn. That
is a very smartly written article. I’ll be sure to bookmark it and
come back to learn more of your helpful info. Thanks for the post.
I’ll definitely return.
I’d like to find out more? I’d love to find out some additional information.
What’s up, yup this piece of writing is in fact fastidious and I have learned
lot of things from it regarding blogging. thanks.
Thank you for every other fantastic post. Where else could anyone get
that kind of info in such an ideal approach of writing?
I have a presentation next week, and I’m at the search
for such info.
Wow that was odd. I just wrote an very long comment but after I clicked submit my comment didn’t
show up. Grrrr… well I’m not writing all that
over again. Anyway, just wanted to say excellent blog!
Magnificent beat ! I wish to apprentice whilst you amend your website, how could i
subscribe for a weblog website? The account aided me a appropriate deal.
I were tiny bit familiar of this your broadcast offered vibrant transparent concept
Today, I went to the beach with my children. I found a sea shell and gave it to
my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the shell to her ear
and screamed. There was a hermit crab inside and it pinched her ear.
She never wants to go back! LoL I know this is completely off
topic but I had to tell someone!
Good post. I learn something totally new and challenging on sites I stumbleupon every day.
It’s always useful to read content from other authors and practice
something from their web sites.
Hi mates, good post and nice arguments commented here, I am truly enjoying by these.
Good post. I learn something totally new and challenging on sites I stumbleupon everyday.
It’s always helpful to read content from other writers and practice a
little something from other sites.
I visited multiple sites however the audio feature for audio songs existing at this site is in fact wonderful.
At this moment I am going to do my breakfast, after
having my breakfast coming again to read other news.
Hi to all, as I am actually keen of reading this web site’s post
to be updated on a regular basis. It contains pleasant data.
Just wish to say your article is as astonishing. The clarity in your
post is simply spectacular and i could assume you’re an expert on this subject.
Well with your permission allow me to grab your feed to keep up to date with forthcoming post.
Thanks a million and please keep up the rewarding work.
Hi there it’s me, I am also visiting this site regularly,
this website is genuinely nice and the viewers are in fact sharing good thoughts.
This is very interesting, You are a very skilled
blogger. I’ve joined your rss feed and look forward to seeking more of your magnificent post.
Also, I have shared your website in my social
networks!
I could not resist commenting. Well written!
Hi, I do think this is a great blog. I stumbledupon it 😉 I will return yet
again since I bookmarked it. Money and freedom is the best way
to change, may you be rich and continue to guide other people.
Hello everyone, it’s my first visit at this website, and piece
of writing is really fruitful in favor of me, keep up posting these articles.
Why people still use to read news papers when in this technological globe all is available on net?
I like the valuable info you provide in your articles.
I’ll bookmark your blog and check again here regularly. I’m quite certain I will learn lots of new stuff right here!
Good luck for the next!
Takipçi Satın Al Seçenekleri ile takip2018 eşsiz benzersiz hizmetler sunuyor.
Şirketin hizmetlerinden faydalanarak dilediğiniz kadar takipçiye
ulaşabilirsiniz, en iyi iyi takipçi satın al sitesi
If some one wants to be updated with latest technologies then he must be pay a quick visit
this site and be up to date daily.
This design is incredible! You obviously know how to keep a reader amused.
Between your wit and your videos, I was almost moved to start my own blog (well,
almost…HaHa!) Fantastic job. I really enjoyed what you had to say, and more
than that, how you presented it. Too cool!
Actually when someone doesn’t understand then its up to other users that they will assist, so here it
takes place.
Its like you read my mind! You seem to know a lot about
this, like you wrote the book in it or something. I think that you could do
with some pics to drive the message home a little bit, but other than that, this is magnificent blog.
An excellent read. I’ll definitely be back.
I’m truly enjoying the design and layout of your site. 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!