ci: upload tagged AppVeyor installers as GitHub releases
authorVincent Fu <vincent.fu@samsung.com>
Mon, 8 Aug 2022 17:51:51 +0000 (17:51 +0000)
committerJens Axboe <axboe@kernel.dk>
Tue, 9 Aug 2022 13:07:09 +0000 (07:07 -0600)
Deploy Windows installers built by AppVeyor as releases on GitHub. This
process is triggered only when tags are uploaded to the repository.

Patch was created using this guide:
https://www.appveyor.com/docs/deployment/github/

- Generate a GitHub authentication token with public_repo scope:
  https://github.com/settings/tokens
- Login to AppVeyor and encrypt GitHub token: Account -> Encrypt YAML
  https://ci.appveyor.com/tools/encrypt
- Insert encrypted token in appveyor.yml on the secure: line under
  auth_token:

With APPVEYOR_REPO_TAG set to true only tags pushed to GitHub will have
Cygwin MSI installers uploaded as releases to GitHub.

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
Link: https://lore.kernel.org/r/20220808175133.37920-2-vincent.fu@samsung.com
[axboe: replace token with right one]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
.appveyor.yml

index b94eefe318e46393c5ca75a54d54456c5558f707..e55fc3d13f12c0bcbb837eb1bafe650cdf82bfb2 100644 (file)
@@ -50,5 +50,18 @@ after_build:
 test_script:
   - python.exe t/run-fio-tests.py --artifact-root test-artifacts --debug
 
+deploy:
+  - provider: GitHub
+    description: fio Windows installer
+    auth_token:                      # encrypted token from GitHub
+      secure: Tjj+xRQEV25P6dQgboUblTCKx/LtUOUav2bvzSCtwMhHMAxrrn2adod6nlTf0ItV
+    artifact: fio.msi                # upload installer to release assets
+    draft: false
+    prerelease: false
+    on:
+      branch: master                 # release from this branch only
+      APPVEYOR_REPO_TAG: true        # deploy on tag push only
+      DISTRO: cygwin
+
 on_finish:
   - 'bash.exe -lc "cd \"${APPVEYOR_BUILD_FOLDER}\" && [ -d test-artifacts ] && 7z a -t7z test-artifacts.7z test-artifacts -xr!foo.0.0 -xr!latency.?.0 -xr!fio_jsonplus_clat2csv.test && appveyor PushArtifact test-artifacts.7z'