参照相关文档,在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’ve been surfing online more than 3 hours today, yet I never found any interesting article like yours.
It’s pretty worth enough for me. In my view, if all website owners and bloggers made good content
as you did, the net will be a lot more useful than ever before.
I have been browsing online greater than three hours as of late, yet I
never found any fascinating article like yours.
It’s lovely price enough for me. In my opinion, if all
webmasters and bloggers made excellent content material as you
probably did, the internet might be much more useful than ever before.
It is the best time to make some plans for the future and it’s time to be happy.
I have read this post and if I could I want to suggest you
few interesting things or tips. Maybe you could write next articles referring to this article.
I desire to read more things about it!
I have been browsing online more than three hours today,
yet I never found any interesting article like yours. It’s pretty worth enough for me.
In my view, if all webmasters and bloggers made good content as
you did, the net will be a lot more useful than ever before.
Woah! I’m really enjoying the template/theme
of this blog. It’s simple, yet effective. A lot of times
it’s very difficult to get that “perfect balance” between user friendliness and visual appearance.
I must say that you’ve done a excellent job with this.
Also, the blog loads extremely quick for me on Safari.
Outstanding Blog!
These are in fact enormous ideas in concerning blogging.
You have touched some nice things here. Any way keep up wrinting.
Thank you a lot for sharing this with all of us you actually understand what you’re talking approximately! Bookmarked. Please also visit my web site =). We can have a hyperlink change arrangement between us!
Ahaa, its good discussion on the topic of this post at this place at this webpage, I have read
all that, so now me also commenting at this place.
Ahaa, its nice dialogue regarding this paragraph here at this website,
I have read all that, so at this time me also commenting
at this place.
I am sure this post has touched all the internet visitors,
its really really nice article on building up new weblog.
I have taken note that of all forms of insurance, medical health insurance is the most marked by controversy because of the conflict between the insurance policy company’s necessity to remain making money and the consumer’s need to have insurance cover. Insurance companies’ revenue on wellbeing plans are incredibly low, as a result some firms struggle to gain profits. Thanks for the thoughts you discuss through this site.
I’ll right away snatch your rss as I can’t to find your e-mail subscription hyperlink or newsletter service.
Do you’ve any? Please let me realize in order that I may subscribe.
Thanks.
It is the best time to make some plans for the future and it’s time to be
happy. I have read this post and if I could I desire to suggest you some interesting things or advice.
Maybe you can write next articles referring
to this article. I desire to read more things about it!
It’s appropriate time to make a few plans for the future and it’s
time to be happy. I have read this post and if I may just I wish to counsel you few interesting issues or suggestions.
Maybe you could write next articles regarding this article.
I want to read more issues about it!
Hi there! Someone in my Myspace group shared this
site with us so I came to look it over. I’m definitely enjoying the information.
I’m book-marking and will be tweeting this to my followers!
Excellent blog and terrific design and style.
Write more, thats all I have to say. Literally, it seems as though you relied on the video
to make your point. You clearly know what youre talking about,
why throw away your intelligence on just posting videos to your site when you could be giving us something enlightening to read?
Hi, i think that i saw you visited my web site so i came
to “return the favor”.I am trying to find things to enhance my site!I suppose its ok to use some of your ideas!!
This blog was… how do you say it? Relevant!! Finally I’ve found something which helped me.
Thanks a lot!
Good day! Would you mind if I share your blog with my zynga group?
There’s a lot of people that I think would really enjoy your content.
Please let me know. Thank you
Fascinating blog! Is your theme custom made or did you download it from
somewhere? A design like yours with a few simple tweeks would really make my blog jump out.
Please let me know where you got your theme.
Thanks a lot
This piece of writing will assist the internet users
for building up new website or even a blog from start to
end.
Hi! I just wanted to ask if you ever have any issues with hackers?
My last blog (wordpress) was hacked and I ended up losing several weeks of hard work due to no backup.
Do you have any methods to protect against hackers?
Wonderful, what a weblog it is! This webpage provides helpful
information to us, keep it up.
Hi mates, pleasant article and pleasant urging commented here, I am actually enjoying by these.
I constantly spent my half an hour to read this website’s content everyday along with a cup of coffee.
If you are going for most excellent contents like me, just pay a quick visit this site everyday for the reason that it gives quality contents, thanks| Kerri Melvin Sellma
Remarkable! Its really amazing post, I have got much clear idea regarding from this paragraph.
It’s actually a great and helpful piece of information. I’m
happy that you shared this helpful information with us.
Please stay us informed like this. Thank you for sharing.
İnstagram uygulamasında yüksek takipçisi olan hesapların yapmış olduğu paylaşımlar uygulamanın keşfet
sayfasına da düşüyor, Sende keşfete düşmek için takipçi al mutlu ol
Takipçi satın almak sadece gelir elde etmek isteyen kişilerin değil
hesaplarındaki takipçi sayısını
yükselterek popüler bir profil oluşturmak isteyen kullanıcılarında tercih ettikleri bir yöntemdir
. Instagram fenomeni olmak için İnstagram takipçi sayınızı megatakip adresi ile güvenilir sekilde takipci alabilirsiniz
What’s Happening i am new to this, I stumbled upon this I
have found It positively helpful and it has helped me out loads.
I am hoping to give a contribution & help other
customers like its helped me. Good job.
Hello to all, since I am truly eager of reading this blog’s post to be updated daily.
It contains nice stuff.
Hmm is anyone else encountering problems with the images on this blog loading?
I’m trying to determine if its a problem on my end or if it’s the
blog. Any suggestions would be greatly appreciated.
When I initially commented I clicked the “Notify me when new comments are added” checkbox and
now each time a comment is added I get four emails with the same comment.
Is there any way you can remove people from that service?
Cheers!
Hi, I desire to subscribe for this website to
take newest updates, therefore where can i do it please assist.
You really make it appear really easy with your presentation but I to find this topic to be really something that I feel I would by no means understand. It seems too complicated and very wide for me. I am having a look forward for your next submit, I will try to get the dangle of it! Clara Dew Rossuck
Space fascinated many artists and scientists from ancient times. Addi Ethelbert Evangeline
Very descriptive article, I liked that a lot. Will there be a part 2? Cherey Ole Pavlish
Mahalo, Aleta! Your blog is truthful, accurate, well-delivered, and timly! It is with this type of honest communication, written following biblical principles, that we can move forward and repair our country. Thank you. I am looking forward to more of your writing. Willie Agosto Yalonda
Can I simply say what a aid to search out somebody who actually is aware of what theyre speaking about on the internet. Theresa Jerrold Cami
Definitely believe that which you said. Your favorite reason seemed to be on the web the simplest thing to
be aware of. I say to you, I definitely get irked while
people think about worries that they plainly don’t know about.
You managed to hit the nail upon the top and also defined out the whole thing without having side effect , people
can take a signal. Will likely be back to get more.
Thanks
Hi there, constantly i used to check blog posts here in the early hours in the morning, as i enjoy to learn more and more.
Hi there! Do you use Twitter? I’d like to follow you if that would be okay.
I’m definitely enjoying your blog and look forward to new
updates.
You made some decent points there. I looked on the web to find out
more about the issue and found most people will go
along with your views on this site.
I go to see day-to-day some blogs and blogs to read
articles, except this website provides quality based articles.
I’m not that much of a internet reader to be honest but your blogs really nice, keep it up!
I’ll go ahead and bookmark your site to come back later.
Many thanks
写得很棒
Very good info. Lucky me I came across your site by chance (stumbleupon).
I have book marked it for later!
No matter if some one searches for his necessary thing,
so he/she wants to be available that in detail, thus that thing is maintained over here.
For latest information you have to pay a visit world wide web and on world-wide-web I
found this site as a most excellent site for most recent updates.