refactor(action): rebuild in TypeScript based on typescript-action template repo (#9)

This commit is contained in:
2025-10-27 21:31:03 +00:00
committed by GitHub
parent e58fa0f2f8
commit 733ded1f0b
71 changed files with 10646 additions and 6590 deletions

View File

@@ -1,27 +1,15 @@
<h1 align="center">
update-tags-action
</h1>
<div align="center">
<p align="center">
<strong>
Easily create/update one or more Git tags in a GitHub repository.
</strong>
</p>
# update-tags-action
<p align="center">
<a href="https://github.com/jimeh/update-tags-action/releases">
<img src="https://img.shields.io/github/v/tag/jimeh/update-tags-action?label=release" alt="GitHub tag (latest SemVer)">
</a>
<a href="https://github.com/jimeh/update-tags-action/issues">
<img src="https://img.shields.io/github/issues-raw/jimeh/update-tags-action.svg?style=flat&logo=github&logoColor=white" alt="GitHub issues">
</a>
<a href="https://github.com/jimeh/update-tags-action/pulls">
<img src="https://img.shields.io/github/issues-pr-raw/jimeh/update-tags-action.svg?style=flat&logo=github&logoColor=white" alt="GitHub pull requests">
</a>
<a href="https://github.com/jimeh/update-tags-action/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/jimeh/update-tags-action.svg?style=flat" alt="License Status">
</a>
</p>
**Easily create/update one or more Git tags in a GitHub repository.**
[![Latest Release](https://img.shields.io/github/release/jimeh/update-tags-action.svg)](https://github.com/jimeh/update-tags-action/releases)
[![GitHub Issues](https://img.shields.io/github/issues/jimeh/update-tags-action.svg?logo=github&logoColor=white)](https://github.com/jimeh/update-tags-action/issues)
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/jimeh/update-tags-action.svg?logo=github&logoColor=white)](https://github.com/jimeh/update-tags-action/pulls)
[![License](https://img.shields.io/github/license/jimeh/update-tags-action.svg)](https://github.com/jimeh/update-tags-action/blob/main/LICENSE)
</div>
Generally useful for moving major (`v1`) and minor (`v1.2`) tags to same commit
as the latest `v1.x.x` tag.
@@ -34,6 +22,8 @@ to move its own major and minor tags.
### Basic
<!-- x-release-please-start-major -->
```yaml
- uses: jimeh/update-tags-action@v1
with:
@@ -48,6 +38,8 @@ to move its own major and minor tags.
v1.2
```
<!-- x-release-please-end -->
### With Release Please
This example uses
@@ -56,24 +48,58 @@ but you can just as easily use the official
[google-github-actions/release-please-action](https://github.com/google-github-actions/release-please-action)
instead.
```yaml
name: Push
on: push
First you'll want the workflow setup to run on push:
```yaml
on: [push]
```
Then you'll want a release-please job which only runs on pushes to your `main`
branch, and exposes relevant outputs from release please:
```yaml
jobs:
# [...]
release-please:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
if: ${{ github.ref == 'refs/heads/main' }}
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
major: ${{ steps.release-please.outputs.major }}
minor: ${{ steps.release-please.outputs.minor }}
permissions:
contents: write
issues: write
pull-requests: write
steps:
- uses: jimeh/release-please-manifest-action@v1
- uses: jimeh/release-please-manifest-action@v3
id: release-please
```
And finally a job to create MAJOR and MINOR release tags, which only runs when
release-please reports having created a release:
<!-- x-release-please-start-major -->
```yaml
jobs:
# [...]
release-tags:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
permissions:
contents: write
steps:
- uses: jimeh/update-tags-action@v1
with:
tags: |
v${{ steps.release-please.outputs.major }}
v${{ steps.release-please.outputs.major }}.${{ steps.release-please.outputs.minor }}
v${{ needs.release-please.outputs.major }}
v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }}
```
<!-- x-release-please-end -->
<!-- action-docs-inputs -->
## Inputs
@@ -98,3 +124,7 @@ jobs:
| updated | List of tags that were updated. |
<!-- action-docs-outputs -->
## License
[MIT](https://github.com/jimeh/update-tags-action/blob/main/LICENSE)