Trying to do a simple github deploy

andre_mikulec's Avatar

andre_mikulec

05 Mar, 2019 01:00 AM

Hi,

Trying to do a simple github deploy

I do not understand git, github, and tags.
I do not understand any of this:
"
Publishing artifacts to GitHub Releases
https://www.appveyor.com/docs/deployment/github/
"
The abstraction does not help.
I need a simple working example.
(The answer.)

Of everything I have tried,
on every commit and push, either "nothing' happens
or I get a looping chain of "builds and deploys (or "not deploys")

I am simply trying to do the following.

(1) Make a git commit and push.
(2) Appveyor builds and deploys once.

and

(1) Choose from the GUI menu "NEW BUILD"
(2) Appveyor builds and deploys once.

and

(1) Choose from the GUI menu "RE-BUILD COMMIT"
(2) Appveyor builds and deploys once.

I do like automatic tag creation.

This is what I am working with
https://github.com/AndreMikulec/AppVeyorTest/blob/master/appveyor.yml

Basically it is the following:
This below, in all submissions (git commit + push, NEW BUILD, RE-BUILD COMMIT),
performs infinite cyclical loops of builds and deploys.

after_build:
  - cmd: |
      set APPVEYOR_REPO_TAG_NAME=%APPVEYOR_PROJECT_SLUG%_%appveyor_build_version%_%ENVVAR%-%BUILD_SCRIPT_CMD%
      set APPVEYOR_REPO_TAG=true

deploy:
  release: "$(APPVEYOR_PROJECT_SLUG)_$(appveyor_build_version)_%ENVVAR%-%BUILD_SCRIPT_CMD%"
  provider: GitHub
  auth_token:
    secure: <whatever>
  artifact: "%ENVVAR%-%BUILD_SCRIPT_CMD%.zip"
  draft: false
  prerelease: false
  on:
    branch: master
    APPVEYOR_REPO_TAG_NAME: $(APPVEYOR_PROJECT_SLUG)_$(appveyor_build_version)_%ENVVAR%-%BUILD_SCRIPT_CMD%
    APPVEYOR_REPO_TAG: true

What do I need to do to just deploy once and not "infinitely cyclically build and deploy?"

Whatever is redundant or useless, please tell me.

What is really/truly needed would help much.:
a "better" explanation of what is going on on
(1) in order
(2) and why at each step in the web page . . .
"
Publishing artifacts to GitHub Releases
https://www.appveyor.com/docs/deployment/github/
"

Note: git + commit with or without (new) custom tag push
does not seem to be working: git tags do not seem to have any affect: no
builds are started.

Thanks,
Andre

  1. Support Staff 1 Posted by Owen McDonnell on 05 Mar, 2019 01:38 AM

    Owen McDonnell's Avatar

    Hi Andre,

    You can see an explanation of this behaviour in the NOTE here in our docs.

    Basically, you need to add skip_tags: true to your appveyor.yml.

  2. 2 Posted by andre_mikulec on 05 Mar, 2019 06:16 PM

    andre_mikulec's Avatar

    Owen McDonnell,

    Thanks.
    That *works*!

  3. Owen McDonnell closed this discussion on 05 Mar, 2019 06:26 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

26 Mar, 2019 06:34 AM
26 Mar, 2019 06:27 AM
25 Mar, 2019 09:12 PM
25 Mar, 2019 06:34 PM
25 Mar, 2019 06:20 AM

 

24 Mar, 2019 06:52 PM
24 Mar, 2019 05:26 PM
24 Mar, 2019 03:07 AM
22 Mar, 2019 02:20 PM
22 Mar, 2019 11:00 AM
22 Mar, 2019 02:51 AM