参照相关文档,在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’m not that much of a internet reader to be honest but your sites really
nice, keep it up! I’ll go ahead and bookmark your site to come back later.
Cheers
Why visitors still use to read news papers when in this
technological globe everything is available on net?
Hi there everyone, it’s my first visit at this website, and piece of writing is really fruitful designed for
me, keep up posting such articles or reviews.
At this time it sounds like BlogEngine is the preferred blogging platform available right now.
(from what I’ve read) Is that what you’re using on your blog?
I have read so many articles about the blogger lovers except this
piece of writing is truly a good article, keep it up.
Very energetic post, I enjoyed that a lot. Will there be
a part 2?
Link exchange is nothing else however it is just placing the other person’s web site link on your
page at appropriate place and other person will also do similar
in support of you.
Hello, I think your blog might be having browser compatibility
issues. When I look at your website in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping.
I just wanted to give you a quick heads up! Other then that, very good
blog!
I am actually thankful to the owner of this website who has shared this wonderful post at at this
time.
Hello mates, its great piece of writing on the topic of teachingand entirely explained, keep it up all the time.
Hi there! I just want to give you a huge thumbs up
for the excellent info you have got right here on this post.
I’ll be coming back to your site for more soon.
Hello! This is kind of off topic but I need some advice from an established blog.
Is it very difficult to set up your own blog? I’m not very techincal but I can figure things out pretty quick.
I’m thinking about making my own but I’m not sure where to start.
Do you have any tips or suggestions? Thanks
Why people still make use of to read news papers when in this technological globe the whole thing is existing on net?
Its like you read my thoughts! You seem to grasp
so much about this, like you wrote the e-book in it or something.
I think that you simply can do with some p.c. to force the message home a little bit, however instead of that, that is wonderful blog.
A fantastic read. I’ll definitely be back.
You ought to be a part of a contest for one of the most useful websites on the internet.
I will highly recommend this site!
Fantastic site. A lot of useful information here. I’m sending it to several buddies ans also sharing in delicious.
And obviously, thanks for your sweat!
This post is priceless. How can I find out more?
Incredible points. Great arguments. Keep up the good effort.
Article writing is also a fun, if you be acquainted with after that you can write otherwise it is complex
to write.
My partner and I stumbled over here different
web page and thought I should check things out.
I like what I see so now i’m following you. Look forward to
looking into your web page again.
hey there and thank you for your info – I have definitely picked up something new from right
here. I did however expertise several technical issues using
this web site, since I experienced to reload the web
site lots of times previous to I could get it to load correctly.
I had been wondering if your hosting is OK? Not that I’m
complaining, but slow loading instances times will often affect your placement in google
and can damage your quality score if advertising and marketing with
Adwords. Well I’m adding this RSS to my e-mail and could look out for much more of your respective
interesting content. Make sure you update this again soon.
you are in point of fact a excellent webmaster. The web site loading pace is
amazing. It sort of feels that you are doing any distinctive trick.
Furthermore, The contents are masterpiece. you’ve done a magnificent process in this subject!
I’ll right away grab your rss feed as I can’t to find
your email subscription hyperlink or newsletter service.
Do you have any? Kindly permit me understand in order
that I may subscribe. Thanks.
I am really loving the theme/design of your blog.
Do you ever run into any browser compatibility issues?
A few of my blog audience have complained about my website not
working correctly in Explorer but looks great in Chrome.
Do you have any solutions to help fix this issue?
Hey there! I’m at work surfing around your blog from my
new apple iphone! Just wanted to say I love reading through
your blog and look forward to all your posts! Keep up the superb work!
Incredible points. Sound arguments. Keep up the great
work.
hi!,I like your writing very much! proportion we communicate extra about your article on AOL?
I require an expert in this house to resolve my problem.
May be that is you! Taking a look ahead to look you.
Awesome blog! Do you have any recommendations for
aspiring writers? I’m planning to start my own website soon but
I’m a little lost on everything. Would you propose starting with a
free platform like WordPress or go for a paid option? There are so
many choices out there that I’m totally overwhelmed ..
Any suggestions? Bless you!
What’s up, its nice article regarding media print, we all understand
media is a great source of facts.
Every weekend i used to pay a visit this web page, for the reason that i want enjoyment,
for the reason that this this website conations really good funny information too.
whoah this weblog is great i really like reading your articles.
Keep up the good work! You realize, a lot of people are hunting round for
this info, you could aid them greatly.
Hi there it’s me, I am also visiting this site on a regular basis, this web page is actually good and the
visitors are really sharing pleasant thoughts.
I was suggested this blog through my cousin. I am not certain whether this publish is written via him
as no one else know such designated about my
trouble. You’re wonderful! Thanks!
Your style is unique compared to other people I’ve read stuff
from. I appreciate you for posting when you’ve got
the opportunity, Guess I’ll just bookmark this blog.
Very nice post. I just stumbled upon your weblog and
wanted to say that I have truly enjoyed surfing around your blog posts.
In any case I’ll be subscribing to your feed and I hope you write again very soon!
What’s up, all is going nicely here and ofcourse every one is
sharing data, that’s in fact good, keep up writing.
Hi there! I realize this is kind of off-topic
but I needed to ask. Does building a well-established website like yours take a massive amount work?
I am brand new to writing a blog but I do write in my journal every day.
I’d like to start a blog so I can easily share my own experience
and feelings online. Please let me know if you have any kind of ideas or tips for new aspiring
bloggers. Thankyou!
Please let me know if you’re looking for a
article author for your blog. You have some really good posts and I feel I would be a good asset.
If you ever want to take some of the load off, I’d absolutely love to write some content for your blog in exchange for a
link back to mine. Please shoot me an e-mail if interested.
Cheers!
Hmm it looks like your site ate my first
comment (it was extremely long) so I guess I’ll just sum it up what I had
written and say, I’m thoroughly enjoying your blog.
I as well am an aspiring blog writer but I’m still new to the whole thing.
Do you have any points for beginner blog writers?
I’d definitely appreciate it.
Your mode of telling all in this article is genuinely fastidious, every one be able
to without difficulty understand it, Thanks a lot.
Way cool! Some very valid points! I appreciate you writing this write-up and also the rest of the website
is really good.
I do not even know how I ended up here, but I thought this post was good.
I do not know who you are but certainly you are going
to a famous blogger if you are not already 😉 Cheers!
I know this web page presents quality depending
articles and additional material, is there
any other website which offers these kinds of things in quality?
I’d like to find out more? I’d love to find out more details.
I get pleasure from, lead to I found just what I used to be taking
a look for. You’ve ended my four day long hunt!
God Bless you man. Have a nice day. Bye
Hi there, I check your blog daily. Your writing style is awesome, keep doing what you’re doing!
Excellent beat ! I wish to apprentice while you amend your website, how could i subscribe for a weblog site?
The account helped me a applicable deal. I have been tiny bit familiar of this your broadcast
offered bright clear concept
Hi my loved one! I want to say that this post is amazing, great written and include almost all vital infos.
I would like to see more posts like this .
Thanks for some other informative website. Where else may I am
getting that type of info written in such a perfect means?
I have a venture that I’m just now working on, and I’ve been on the look out
for such information.
kızlık bozma onlıne izle school giril amator sex videos rus pornosu sex videosu izle son yılların en sexi götleri
gerdek gecesi kızlık zarı patlatma videoları azeri sekis ru , rus
sekisi viyosu , rusya porno vidosu , rusya sex com
…