Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add retag-release workflow to add a vX.Y.Z tag for our GitHub Action #545

Merged
merged 4 commits into from
Jul 28, 2022

Conversation

RyanGWU82
Copy link
Contributor

🚥 Fix RM-4840

🧰 Changes

The rdme GitHub Action required people to write workflows with the line uses: readmeio/[email protected] but GitHub's convention is for action versions to be tagged v1.2.3. Because of this some users have written uses: readme/[email protected] and of course they expect that to work.

This workflow looks for releases created with a tag like 1.2.3 and adds a second tag like v1.2.3. It uses actions/github-script which is the simplest way to run a short script in a GitHub workflow. There were some existing third-party actions for adding a tag to a repo, but I didn't really want to rely on a third-party script for something so simple. (Admittedly this was going to be a one-liner but with input validation and HTTP error checking it got a bit longer.)

🧬 QA & Testing

Ran this on a little test project and it worked as expected:

Screen Shot 2022-07-28 at 11 15 10 AM

Exits early when the tag doesn't follow semantic versioning style, so that we don't create tags like vv1.2.3 or vdeprecated.

Screen Shot 2022-07-28 at 11 15 01 AM

@RyanGWU82 RyanGWU82 requested review from erunion and kanadgupta July 28, 2022 18:25
@erunion erunion added the enhancement New feature or request label Jul 28, 2022
Copy link
Member

@erunion erunion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good to me!

.github/workflows/retag-release.yaml Outdated Show resolved Hide resolved
.github/workflows/retag-release.yaml Outdated Show resolved Hide resolved
@RyanGWU82 RyanGWU82 requested a review from kanadgupta July 28, 2022 20:06
@RyanGWU82 RyanGWU82 merged commit d600ef4 into main Jul 28, 2022
@RyanGWU82 RyanGWU82 deleted the ryanp/rm-4840-create-a-post-rdme-publish-script-that branch July 28, 2022 20:51
kanadgupta added a commit that referenced this pull request Jul 28, 2022
* fix: support files with .markdown extension

* test: random cleanup

fixing typo, removing unused version param, stricter error checks

* refactor: DRY some docs logic

* feat: add retag-release workflow to add a vX.Y.Z tag for our GitHub Action (#545)

* feat: add retag-release workflow to add a vX.Y.Z tag for our GitHub Action

* Update .github/workflows/retag-release.yaml

Co-authored-by: Kanad Gupta <[email protected]>

* refactor: move code out of YAML and into bin/ script

* fix: lint fixes

Co-authored-by: Kanad Gupta <[email protected]>

Co-authored-by: Ryan Park <[email protected]>
kanadgupta added a commit that referenced this pull request Jul 28, 2022
* chore: create custompages cmd category

* test: fixtures

* feat: initial pass at commands

as part of this, we had to slightly refactor the pushDoc function to augment the data to support the HTML file handling required by the custompages API

* test: initial pass at tests

* docs: update README usage

* test: remove unused version params, stricter error checks

* fix(docs/single): support files with `.markdown` extension (#549)

* fix: support files with .markdown extension

* test: random cleanup

fixing typo, removing unused version param, stricter error checks

* chore: capitalize Markdown

* chore: lowercase all file extension checks

* refactor: DRY some docs logic (#550)

* fix: support files with .markdown extension

* test: random cleanup

fixing typo, removing unused version param, stricter error checks

* refactor: DRY some docs logic

* feat: add retag-release workflow to add a vX.Y.Z tag for our GitHub Action (#545)

* feat: add retag-release workflow to add a vX.Y.Z tag for our GitHub Action

* Update .github/workflows/retag-release.yaml

Co-authored-by: Kanad Gupta <[email protected]>

* refactor: move code out of YAML and into bin/ script

* fix: lint fixes

Co-authored-by: Kanad Gupta <[email protected]>

Co-authored-by: Ryan Park <[email protected]>

Co-authored-by: Ryan Park <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants