seandepagnier / weatherfax_pi

weather fax plugin for opencpn
GNU General Public License v3.0
20 stars 27 forks source link

Win Deployment of VERSION.cmake changes to github.com/seandepagnier/weatherfax_pi #132

Closed rgleason closed 5 years ago

rgleason commented 5 years ago

What follows are references and notes related to deployment appveyor.yml builds

Conditions:

  1. Build succeeds
  2. Version (major, minor, patch or name_suffix) has been incremented by a change to VERSION.cmake.
  3. Description: Somehow allow writing a brief summary description of changes made for Github Description box? Perhaps use the Pull or Commit titles?

Result:

  1. Github new release created with the VERSION.cmake information.
  2. Github Tag: created is [VERSION]
  3. Githhub Name: The new release name "weatherfax_pi-[VERSION]-win32" and is the same as the file created in appveyor Artifacts TAB minus the ".exe"
  4. Github Description: Allows listing the summary of changes.

Appveyor Support Documentation Links:

Github Support for Deployment REST API v3

rgleason commented 5 years ago

With these Deploy Settings at the end of Appveyor.yml

deploy: description: 'release created by AppVeyor CI' provider: GitHub auth_token: '%GitHub_auth_token%' (public key) artifact: installer draft: true prerelease: true on: appveyor_repo_tag: true # deploy on tag push only configuration: Release # Debug contains non-redist MS DLLs

My fork gets this error and does not deploy the Artifact file to a Github Release

"Uploading artifacts... [1/1] build\weatherfax_pi-1.9.001-ov42-win32.exe (721,836 bytes)...100% "GitHub" deployment has been skipped as environment variable has not matched ("appveyor_repo_tag" is "false", should be "true") Build success"

The reason it is failing is because I have not inserted my token into

auth_token: '%GitHub_auth_token%'

rgleason commented 5 years ago

Trying github Deploy keys for my Weatherfax_pi repository

Appveyor Reference - Examples

Appveyor AssemblyInfo patching

Publishing artifacts to GitHub Releases

rgleason commented 5 years ago

Unable to deploy Artifact

Use to encrypt Git public key

Configuring Deploy

rgleason commented 5 years ago

These two links helped explain how it works.

Build on tags (GitHub, GitLab and BitBucket only) - also deploy

Publishing artifacts to GitHub Releases - Usage Scenario - Release every tag build

Then after you've done all your commits and pushed to the remote origin, wait for appveyor to complete properly. Then simply push a new tag to the the remote. Then Appveyor will webhooks will notice this and start appveyor build again.

To push a tag (done after a commit). When on the branch and commit you want... Examples

This is the bottom portion of the appveyor file so far. The auth_token is not working properly yet, but I believe Deployment to github release is likely working.

(top of file is missing for environment, scripts, install and build)

# Artifacts Configuration    #
artifacts: # push all files in directory
  - path: build\weatherfax_pi*.exe
    name: installer

# Deploy Configuration to GitHub Releases
deploy:
  release: weatherfax_pi- $(APPVEYOR_REPO_TAG_NAME)-win32
  description: 'Release of weatherfax_pi $(APPVEYOR_REPO_TAG_NAME) tag created by AppVeyor build $(appveyor_build_version)'
  provider: GitHub
  auth_token:
   secure:8Vd+PKGvcGO8YecwHIpgv6zuSaijeH3fLNUD99GcaJnjNQIluOlkOqB+ifLXCXSD
  # Encrypted fingerprint
  artifact: installer, portable
  draft: true
  prerelease: true
  tag: $(APPVEYOR_REPO_TAG_NAME)
  on:
    APPVEYOR_REPO_TAG: true   # deploy on tag push only
    configuration: Release    # Debug contains non-redist MS DLLs
#   branch: master   # release from master branch only

Next issue to work out is authentication.