Syntax of the release name value in the deploy section of the appveyor.yml configuration file
Hello,
I'm new to Appveyor.
My question is:
Can someone describe the variables in the 'deploy' section of the appveyor.yml file?
Here is the deploy section that is problematic.
It's the environment variable APPVEYOR_REPO_TAG_NAME in the releaseName that I d'ont know how to define.
Can I use space in the value of releaseName?
When I push a new tag, I have a loop of releases that deploy on GitHub, while I would like only one:
deploy:
- provider: GitHub
release: Release $(APPVEYOR_REPO_TAG_NAME)
description: This is the release $(APPVEYOR_REPO_TAG_NAME).
auth_token:
secure: abcd
artifact: addon
on:
appveyor_repo_tag: true
Any help would be appreciated.
Thanks in advance.
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
1 Posted by Ilya Finkelshte... on 21 Sep, 2017 11:16 PM
Please try to specify
$(APPVEYOR_REPO_TAG_NAME)
in the "Tag" field and remove$(APPVEYOR_REPO_TAG_NAME)
from the "release" field.2 Posted by abdelkrim.bensa... on 22 Sep, 2017 10:04 AM
Hello,
Thank you, it works very well.
I have another small problem.
In the description field, I would like to extract only the name of the repo without the name of the owner.
The APPVEYOR_REPO_NAME environment variable contains 'owner-name/repo-name'.
Here is my new deploy section:
deploy:
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
release: Release $(APPVEYOR_REPO_TAG_NAME)
description: This is the release $(APPVEYOR_REPO_TAG_NAME) of the addon $(APPVEYOR_REPO_NAME).
auth_token:
secure: abcd
artifact: addon
on:
appveyor_repo_tag: true
Thanks again for your help.
3 Posted by Ilya Finkelshte... on 22 Sep, 2017 06:27 PM
APPVEYOR_PROJECT_NAME
andAPPVEYOR_PROJECT_SLUG
by default are the same, but you cannot rely on them if you rename the project or have more than one project for the same repo (slug will be appended with random string in this case). You can run something like this inbefore_deploy
script:and then use
$(REPO_NAME)
in your GitHub deployment settings.4 Posted by abdelkrim.bensa... on 23 Sep, 2017 11:21 AM
Thank you very much,
It's great.
This possibility of creating new environment variables is very appreciable.
Thanks again for all.
abdelkrim.bensaid closed this discussion on 23 Sep, 2017 11:22 AM.