basarat / typescript-book

:books: The definitive guide to TypeScript and possibly the best TypeScript book :book:. Free and Open Source 🌹
https://basarat.gitbook.io/typescript/
Other
20.77k stars 2.54k forks source link

Github actions for release ebook on tagging #560

Closed windix closed 4 years ago

windix commented 4 years ago

When a new tag matching with pattern v* (e.g. v0.0.1) has been created, this action will be triggered to create a new release and upload compiled ebooks to it.

Example usage:

git tag v1.0.0
git push origin v1.0.0

You can find an example here: https://github.com/windix/typescript-book/releases/tag/v0.0.2

PS. I was trying to add version to the filename too, but it doesn't work as expected. I got typescript-book-refs.tags.v0.0.1.epub instead of typescript-book-v0.0.1.epub :( So I have removed it.

basarat commented 4 years ago

I don't checkout the project on machine and don't make any tags. Would be it possible to create a new file people can download on each commit?

windix commented 4 years ago

Create tag from cli is the only way I can think of. Github release is based on tag, but there is no way to create a tag on UI*, so I don't really have any other ways to make it work without manually create tag. :(

*actually there is, but it creates a new release too. so it still won't work since the upload-release-asset action doesn't know the upload url if the release is created outside action :(

windix commented 4 years ago

So I think with your current flow, my previous PR #558 works better since it builds on each commit

basarat commented 4 years ago

So I think with your current flow, my previous PR #558 works better since it builds on each commit

Thanks :heart: