roots / wordpress

Automatically updated WordPress Composer package
https://roots.io/composer-wordpress-resources/
MIT License
169 stars 15 forks source link

Automatically make highest tag the latest release #1

Closed austinpray closed 2 years ago

austinpray commented 5 years ago

Maybe throw build notes in release?

Edit: Note that everything is tagged automatically, this is purely to get that nice github release UI image

johnbillion commented 5 years ago

Thanks for this repo, it's just what's needed :-)

I'm converting my plugin's install-wp-tests.sh-based testing setup on Travis CI to use this package instead (along with wp-phpunit/wp-phpunit) and I'd like to retain the ability to lazily test against the latest version of WordPress without having to update the WordPress version number in my Travis config each time there's a new release.

Currently this is achieved by specifying the WP_VERSION=latest environment variable, which install-wp-tests.sh uses as an indication to check the w.org API to fetch the latest tag.

I'd therefore like to use a Composer dependency that looks something like roots/wordpress=latest which corresponds to a branch in this repo that always contains the latest stable release (ie. the highest tag). Is that what this issue is about? If so, a big +1 from me :-)

johnbillion commented 5 years ago

Actually, roots/wordpress=dev-master provides this from the look of things, but this requires minimum-stability: dev in the root, which I don't really want. Would a separate branch that tracked master do the trick? Not sure.

johnbillion commented 5 years ago

More rubber ducking: roots/wordpress=* looks to be the answer.

austinpray commented 5 years ago

Hey @johnbillion!

So this issue was for purely to make a github API call to map a git tag to a github release to get the nice UI. I updated the original post with details.

And yes dev-master is pinned at the latest release so people can track latest WP version for CI tests and stuff. To do this you would specify both "minimum-stability": "dev" and "prefer-stable": true

But yeah looks like roots/wordpress=* might be better anyway

shivapoudel commented 3 years ago

@austinpray Can * results in the same behavior as latest and how to use nightly? I am using this with Github action and in a matrix, I don't want to index * instead use this latest. Overall need support for roots/wordpress="latest|nightly" so how can I do that?