https://github.com/actions-ecosystem/action-push-tag
🔖 GitHub Action to push a Git tag
https://github.com/actions-ecosystem/action-push-tag
actions git github tag
Last synced: 4 months ago
JSON representation
🔖 GitHub Action to push a Git tag
- Host: GitHub
- URL: https://github.com/actions-ecosystem/action-push-tag
- Owner: actions-ecosystem
- License: apache-2.0
- Created: 2020-05-04T23:37:48.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-02-08T18:41:57.000Z (almost 3 years ago)
- Last Synced: 2024-11-20T19:46:53.978Z (12 months ago)
- Topics: actions, git, github, tag
- Language: Shell
- Homepage: https://github.com/marketplace/actions/actions-ecosystem-action-push-tag
- Size: 174 KB
- Stars: 23
- Watchers: 4
- Forks: 16
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Action Push Tag
[![actions-workflow-lint][actions-workflow-lint-badge]][actions-workflow-lint]
[![release][release-badge]][release]
[![license][license-badge]][license]
This is a GitHub Action to push a Git tag.
It would be more useful to use this with other GitHub Actions' outputs.
## Inputs
| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT |
| --------- | -------------------------- | -------- | -------- | ------- |
| `tag` | A Git tag name. | `string` | `true` | `N/A` |
| `message` | A message for the Git tag. | `string` | `false` | `''` |
## Example
```yaml
name: Push a new tag with minor update
on:
push:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
- uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ steps.get-latest-tag.outputs.tag }}
level: minor
- uses: actions-ecosystem/action-push-tag@v1
with:
tag: ${{ steps.bump-semver.outputs.new_version }}
message: '${{ steps.bump-semver.outputs.new_version }}: PR #${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}'
```
For a further practical example, see [.github/workflows/release.yml](.github/workflows/release.yml).
## License
Copyright 2020 The Actions Ecosystem Authors.
Action Push Tag is released under the [Apache License 2.0](./LICENSE).
[actions-workflow-lint]: https://github.com/actions-ecosystem/action-push-tag/actions?query=workflow%3ALint
[actions-workflow-lint-badge]: https://img.shields.io/github/workflow/status/actions-ecosystem/action-push-tag/Lint?label=Lint&style=for-the-badge&logo=github
[release]: https://github.com/actions-ecosystem/action-push-tag/releases
[release-badge]: https://img.shields.io/github/v/release/actions-ecosystem/action-push-tag?style=for-the-badge&logo=github
[license]: LICENSE
[license-badge]: https://img.shields.io/github/license/actions-ecosystem/action-add-labels?style=for-the-badge