Thread Tools Display Modes
10-01-19, 09:06 AM   #61
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by MooreaTv View Post
You can use Github Actions (just need to signup for it and afaik everyone asking gets immediate access to it) to run the packager with no other dependencies

here is an example:
https://github.com/mooreatv/AuctionD...packaging.yaml
There are plans for something simpler than that
  Reply With Quote
02-01-20, 05:19 PM   #62
yess
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 29
Classic Release

How do I make and additional classic release?

Can I just add add asecond script line like this?:

script: curl -s https://raw.githubusercontent.com/Bi...ter/release.sh | bash
script: curl -s https://raw.githubusercontent.com/Bi...ter/release.sh -g 1.13.3 | bash

Together with the tags for the toc:

#@retail@
## Interface: 80200
#@end-retail@
#@non-retail@
# ## Interface: 11303
#@end-non-retail@
  Reply With Quote
02-01-20, 07:28 PM   #63
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by yess View Post
How do I make and additional classic release?

Can I just add add asecond script line like this?:

script: curl -s https://raw.githubusercontent.com/Bi...ter/release.sh | bash
script: curl -s https://raw.githubusercontent.com/Bi...ter/release.sh -g 1.13.3 | bash

Together with the tags for the toc:

#@retail@
## Interface: 80200
#@end-retail@
#@non-retail@
# ## Interface: 11303
#@end-non-retail@
The TOC file looks right, but remove the "# " at the front of 11303.
For the script part I'm unsure, I stopped using Travis.
  Reply With Quote
02-01-20, 10:05 PM   #64
yess
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 29
What are you using now?
  Reply With Quote
02-02-20, 05:18 AM   #65
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Is there a guide for github actions? (preferably not from moorea)
  Reply With Quote
02-10-20, 05:04 PM   #66
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Ketho View Post
Is there a guide for github actions? (preferably not from moorea)
We had plans of supporting actions directly with the packager repo (see https://github.com/BigWigsMods/packager/pull/44), but we hit some snags with the implementation (both actions and "packages") by GitHub. Don't know if that's been resolved or not now, feel free to test it.
  Reply With Quote
02-12-20, 02:23 AM   #67
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Originally Posted by p3lim View Post
Don't know if that's been resolved or not now, feel free to test it.

I'm not sure what I'm even doing but the workflow seemed to work, it packaged a tag for me
https://github.com/ketho-wow/KethoIn...runs/440568923
  Reply With Quote
02-14-20, 05:49 PM   #68
nebula
A Deviate Faerie Dragon
 
nebula's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 16
Originally Posted by Ketho View Post
I'm not sure what I'm even doing but the workflow seemed to work, it packaged a tag for me
https://github.com/ketho-wow/KethoIn...runs/440568923
You only need that second step (the block after "# run release.sh with arguments") for it to work

A basic non-docker workflow would be something like this: https://gist.github.com/nebularg/7b2...de591023cca245

As another example, here is the workflow I use for PitBull4: https://github.com/nebularg/PitBull4...lows/build.yml
  Reply With Quote
02-14-20, 06:00 PM   #69
nebula
A Deviate Faerie Dragon
 
nebula's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 16
Originally Posted by yess View Post
How do I make and additional classic release?

Can I just add add asecond script line like this?:

script: curl -s https://raw.githubusercontent.com/Bi...ter/release.sh | bash
script: curl -s https://raw.githubusercontent.com/Bi...ter/release.sh -g 1.13.3 | bash
To add another script entry you need to make it a list and to build classic you'd need to fix the args, so you'd end up with

Code:
script:
  - curl -s https://raw.githubusercontent.com/BigWigsMods/packager/master/release.sh | bash
  - curl -s https://raw.githubusercontent.com/BigWigsMods/packager/master/release.sh | bash -s -- -g 1.13.3
Although you might want to flip the build order so the retail version is shown in the big "Main File" box on the CurseForge files page. (#justnitpickythings)

Originally Posted by yess View Post
Together with the tags for the toc:
Yea, that is correct (looks a bit awkward, I know)

Last edited by nebula : 02-14-20 at 06:14 PM.
  Reply With Quote
02-20-20, 01:35 AM   #70
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Originally Posted by nebula View Post
You only need that second step (the block after "# run release.sh with arguments") for it to work

Oh, thanks! I changed it to this workflow now

It did throw an error when uploading a file to GitHub. Something about the file already existing, although I don't see the zip in my release assets
edit: must be just a mishap, it's working on my other projects
Code:
Creating GitHub release: https://github.com/ketho-wow/VendorPrice/releases/tag/1.3.1
Uploading VendorPrice-1.3.1-classic.zip... Error (422)
{"message":"Validation Failed","request_id":"07C1:101E:B0DCA:E52E2:5E4E3158","documentation_url":"https://developer.github.com/v3","errors":[{"resource":"ReleaseAsset","code":"already_exists","field":"name"}]}

Last edited by Ketho : 02-20-20 at 05:03 PM.
  Reply With Quote
04-15-20, 01:23 PM   #71
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
What a great guide! Thanks!
Updating these links in the original post would make it even more convenient:


https://authors.curseforge.com/knowledge-base/world-of-warcraft/527-preparing-the-packagemeta-file
->
https://authors.curseforge.com/knowledge-base/projects/527-preparing-the-packagemeta-file


https://authors.curseforge.com/knowledge-base/world-of-warcraft/532-repository-keyword-substitutions
->
https://authors.curseforge.com/knowledge-base/projects/532-repository-keyword-substitutions
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
08-07-20, 08:16 PM   #72
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
DISCLAIMER

This guide has been deprecated in favour of GitHub Actions, as it's more integrated and (honestly) easier to set up.

A full guide is provided on the wiki for the packager itself. Direct link: https://github.com/BigWigsMods/packa...tions-workflow

Last edited by p3lim : 08-07-20 at 08:49 PM.
  Reply With Quote
08-17-20, 09:04 AM   #73
devilArt
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 51
Originally Posted by p3lim View Post
DISCLAIMER

This guide has been deprecated in favour of GitHub Actions, as it's more integrated and (honestly) easier to set up.

A full guide is provided on the wiki for the packager itself. Direct link: https://github.com/BigWigsMods/packa...tions-workflow
hey p3limhow do I use "wowi API token" when I setup github action?
  Reply With Quote
08-19-20, 03:48 PM   #74
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by devilArt View Post
hey p3limhow do I use "wowi API token" when I setup github action?
1. Get a token from WoWInterface
2. Store the token as a secret for your project on GitHub, name it WOWI_API_TOKEN
3. Define WOWI_API_TOKEN as an environment variable in the workflow

How to get a WoWInterface token is documented in the packager readme, how to add GitHub secrets is documented in the wiki page for the action, and how to add it as an environment variable in the workflow is also documented there.
  Reply With Quote
08-22-20, 05:42 PM   #75
StormFX
A Flamescale Wyrmkin
 
StormFX's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 109
Ignore this. I really should look at the dates.

Last edited by StormFX : 08-25-20 at 07:24 PM.
  Reply With Quote
11-16-20, 06:16 AM   #76
Niketa
A Wyrmkin Dreamwalker
 
Niketa's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2013
Posts: 54
I'm having issues setting up my GitHub workflow and was hoping to get some help.

https://github.com/niketa-wow/guildb...thub/workflows

What I'm trying to accomplish:
1. Tags created from my development branch should remove the WoWI addon id as they will be alpha/beta releases only, which WoWI doesn't support.
2. Tags created from my stable branch should upload to both Curse and WoWI per usual.
3. Only new tags should be created.

Problems I'm having:
In the example I linked, I created a tag "GuildBankSnapshots-v2.0.4". I typically tag "AddonName-v0.0.0-beta", etc.
1. Builds are being tagged as alphas when they should be releases.
2. Possibly because of the above problem, nothing is being uploaded to WoWI. The API token is set up for the repo, so that's not the problem.
3. Uploads are being named with a random string at the end (for the commit or something, idk; I'm still a relative noob to git).
4. Pushing commits after creating a tag triggers builds again for the same tag. I tagged and pushed v2.0.4 and then made a small change to the workflow file and committed, which triggered the action to upload to Curse AGAIN for the same tag/file.

I wasn't really having issues like this with travis-ci, so I'm sure it's something about the "on" part of my Github actions and I can't quite figure it out.

Thanks!

(This particular addon, I need to change it up again and remove classic as it's not relevant for it. Copy and pasted from another addon I primarily work on and forgot to take that off. But alas, I'm afraid to make the change again and have to go back and manually delete files from Curse again. Been doing that all night.)

Last edited by Niketa : 11-16-20 at 06:23 AM.
  Reply With Quote
11-16-20, 12:09 PM   #77
StormFX
A Flamescale Wyrmkin
 
StormFX's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 109
Looks like most of your problem is your tags line.

For your "stable" builds, try something like:

Code:
on:
  push:
    tags:
      - '*.*.*'
      - '!*.*.*-*'
For your developmental builds, try something like:

Code:
on:
  push:
    tags:
      - '*.*.*-*'
Note the '!*.*.*-*' bit for the stable file. The ! means to ignore tags that match expression that follows, so you're explicitly telling the stable file to ignore developmental builds.

You don't need your add-on's name in tags. The packager does that and it's kind of redundant. So keep them simple, like "v2.0.4" or "v2.0.4-beta". If you must do it, make sure you include it in your tag lines for your workflows. The tag lines match the name of tags (regex-ish), so you'd do something like:

Code:
      - 'GuildBankSnapshots-*.*.*'
      - '!GuildBankSnapshots-*.*.*-*'
Etc.

Last edited by StormFX : 11-16-20 at 12:16 PM.
  Reply With Quote
11-16-20, 09:23 PM   #78
Niketa
A Wyrmkin Dreamwalker
 
Niketa's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2013
Posts: 54
Originally Posted by StormFX View Post
Looks like most of your problem is your tags line.

For your "stable" builds, try something like:

Code:
on:
  push:
    tags:
      - '*.*.*'
      - '!*.*.*-*'
For your developmental builds, try something like:

Code:
on:
  push:
    tags:
      - '*.*.*-*'
Note the '!*.*.*-*' bit for the stable file. The ! means to ignore tags that match expression that follows, so you're explicitly telling the stable file to ignore developmental builds.

You don't need your add-on's name in tags. The packager does that and it's kind of redundant. So keep them simple, like "v2.0.4" or "v2.0.4-beta". If you must do it, make sure you include it in your tag lines for your workflows. The tag lines match the name of tags (regex-ish), so you'd do something like:

Code:
      - 'GuildBankSnapshots-*.*.*'
      - '!GuildBankSnapshots-*.*.*-*'
Etc.
This seems to have fixed the issue.

Just for educational reasons, could you explain why the previous version I had may have behaved in the way they did? Such as why it was rerunning on old tags and releasing everything as an alpha?

Also, should I have my workflows only on my stable branch or should I have it on my development branch too? I'm thinking just stable because I think it was double uploading when I had it on both, but I want to be sure I understand it right.

Thanks!
  Reply With Quote
11-17-20, 12:38 PM   #79
StormFX
A Flamescale Wyrmkin
 
StormFX's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 109
Originally Posted by Niketa View Post
Just for educational reasons, could you explain why the previous version I had may have behaved in the way they did? Such as why it was rerunning on old tags and releasing everything as an alpha?
For old tags, it was probably because they didn't exist on the GitHub repo (only locally). It was packaging all commits/tags because your previous tags line told it to. (** is a wildcard that matches all commits/tags). As for it packaging alphas, a non-tag commit is considered an alpha by the packager.

Originally Posted by Niketa View Post
Also, should I have my workflows only on my stable branch or should I have it on my development branch too? I'm thinking just stable because I think it was double uploading when I had it on both, but I want to be sure I understand it right.

Thanks!
By filtering your tags as I demonstrated above, tags should be properly packaged as release or alpha/beta, as long as they're tagged properly. You could theoretically leave workflows intact and synced on both branches.

If you want it more refined, you could add back in the branch filtering that you had previously. Alternatively, if your commits and tags are exclusive to their respective branch (ie, you only push alpha/beta to the development branch), you could simply remove the stable workflow from the development branch and remove the development workflow from the stable branch.
  Reply With Quote
12-24-20, 07:31 AM   #80
Niketa
A Wyrmkin Dreamwalker
 
Niketa's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2013
Posts: 54
I'm having some more issues with my configuration for Github actions.

It seemed to be working fine when I released stable versions, but whenever I try to release an alpha, the packager says "Found future tag "v3.0-alpha3", not packaging."
I can't figure out how to make it actually package and release like it's supposed to and it's been getting rather frustrating.

Here is the config file. I had to add the branch name to the clone project step because whenever I left that out, it would just repackage and release my latest release version (v2.1.5). However, after I changed this it recognized the alpha version (v3.0-alpha3), but gave the above error.

I tried messing around with the on push tags but it was a no go with anything I tried.
  Reply With Quote

WoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » Guide: Automagically package and publish addons

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off