WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Tutorials & Other Helpful Info. (https://www.wowinterface.com/forums/forumdisplay.php?f=12)
-   -   Guide: Automagically package and publish addons (https://www.wowinterface.com/forums/showthread.php?t=55801)

p3lim 10-01-19 09:06 AM

Quote:

Originally Posted by MooreaTv (Post 334060)
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 ;)

yess 02-01-20 05:19 PM

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@

p3lim 02-01-20 07:28 PM

Quote:

Originally Posted by yess (Post 335065)
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.

yess 02-01-20 10:05 PM

What are you using now?

Ketho 02-02-20 05:18 AM

Is there a guide for github actions? (preferably not from moorea)

p3lim 02-10-20 05:04 PM

Quote:

Originally Posted by Ketho (Post 335068)
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.

Ketho 02-12-20 02:23 AM

Quote:

Originally Posted by p3lim (Post 335106)
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

nebula 02-14-20 05:49 PM

Quote:

Originally Posted by Ketho (Post 335124)
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 :p

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

nebula 02-14-20 06:00 PM

Quote:

Originally Posted by yess (Post 335065)
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)

Quote:

Originally Posted by yess (Post 335065)
Together with the tags for the toc:

Yea, that is correct (looks a bit awkward, I know)

Ketho 02-20-20 01:35 AM

Quote:

Originally Posted by nebula (Post 335145)
You only need that second step (the block after "# run release.sh with arguments") for it to work :p


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 :confused:
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"}]}


LudiusMaximus 04-15-20 01:23 PM

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

p3lim 08-07-20 08:16 PM

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

devilArt 08-17-20 09:04 AM

Quote:

Originally Posted by p3lim (Post 336551)
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?

p3lim 08-19-20 03:48 PM

Quote:

Originally Posted by devilArt (Post 336637)
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.

StormFX 08-22-20 05:42 PM

Ignore this. I really should look at the dates. :p

Niketa 11-16-20 06:16 AM

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.)

StormFX 11-16-20 12:09 PM

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.

Niketa 11-16-20 09:23 PM

Quote:

Originally Posted by StormFX (Post 337592)
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!

StormFX 11-17-20 12:38 PM

Quote:

Originally Posted by Niketa (Post 337594)
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.

Quote:

Originally Posted by Niketa (Post 337594)
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.

Niketa 12-24-20 07:31 AM

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.


All times are GMT -6. The time now is 12:36 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI