Automate WinForm app publish to match NAppUpdate standard
If you’re using NAppUpdate framework to publish your WinForm app, this post is for you.
Assume that you already setup NAppUpdate successfully. Now we want to simplify it to just 1 click publish, and the others clients can just update it
In your server, you need a path to store the xml file. For my case, I will create a subdomain for it. E.g.
Assume your site hosted in this path
The index.php you can just simply put some dummy text into it, because the most important file is release.xml
The content of release.xml is auto generated. I’ve created the php file, download it to your server, and place it anywhere, (e.g. /path/to/publish.php)
Then create a cronjob for it
* * * * * /usr/bin/php /path/to/publish.php > /dev/null 2>&1
This cronjob will run every minute, so once you have new file published to server, it will auto generate the release.xml
First you need to build the project
Then go to property there
And the go to Publish tab
Set your FTP details, then publish it
Edit the file /path/to/publish.php, change the constants to match your own
Now once your app published, the cronjob will execute this php script, and the script will generate release.xml,
and copy the necessary files to releases folder.
Inside the releases folder will then have all version of what you have published.