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

Updated README.md #69

Merged
merged 1 commit into from
Jun 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 29 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
[![CI](https://github.com/tj-actions/sync-release-version/workflows/CI/badge.svg)](https://github.com/tj-actions/sync-release-version/actions?query=workflow%3ACI)
[![Update release version.](https://github.com/tj-actions/sync-release-version/workflows/Update%20release%20version./badge.svg)](https://github.com/tj-actions/sync-release-version/actions?query=workflow%3A%22Update+release+version.%22)
[![Public workflows that use this action.](https://img.shields.io/endpoint?url=https%3A%2F%2Fapi-tj-actions1.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3Dtj-actions%2Fsync-release-version%26badge%3Dtrue)](https://github.com/search?o=desc&q=tj-actions+sync-release-version+path%3A.github%2Fworkflows+language%3AYAML&s=&type=Code)
[![Update release version.](https://github.com/tj-actions/sync-release-version/workflows/Update%20release%20version./badge.svg)](https://github.com/tj-actions/sync-release-version/actions?query=workflow%3A%22Update+release+version.%22)
[![Public workflows that use this action.](https://img.shields.io/endpoint?url=https%3A%2F%2Fapi-tj-actions1.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3Dtj-actions%2Fsync-release-version%26badge%3Dtrue)](https://github.com/search?o=desc\&q=tj-actions+sync-release-version+path%3A.github%2Fworkflows+language%3AYAML\&s=\&type=Code)

sync-release-version
--------------------
Problem
-------
With multiple files that need to be updated each time a new version of your software is released.
## sync-release-version

## Problem

With multiple files that need to be updated each time a new version of your software is released.

`sync-release-version` makes this process less complex by using a regex pattern to match the lines in the specified files that needs to be updated.

Helpful Resources
------------------
- https://www.regextester.com/111539
- https://www.tutorialspoint.com/unix/unix-regular-expressions.htm
## Helpful Resources

Usage
-----
* https://www.regextester.com/111539
* https://www.tutorialspoint.com/unix/unix-regular-expressions.htm

## Usage

#### Sync a project release version number.

Update files that reference a project version with a new release number.

> NOTE: ⚠️
> * This example assumes a post release operation i.e changes are made to a README after a new version is releaased.
>
> * This example assumes a post release operation i.e changes are made to a README after a new version is releaased.

```yaml
...
Expand All @@ -46,7 +45,6 @@ Update files that reference a project version with a new release number.
echo "Upgraded from ${{ steps.sync-release-version.outputs.old_version }} -> ${{ steps.sync-release-version.outputs.new_version }}"
```


### Recomended usage with [peter-evans/create-pull-request@v3](https://github.com/peter-evans/create-pull-request)

```yaml
Expand Down Expand Up @@ -81,8 +79,7 @@ jobs:
reviewers: "jackton1"
```

Example
-------
## Example

![Sample](./Sample.png)

Expand All @@ -91,6 +88,7 @@ Creating a new release `v6.8 -> v7` using the recommended configuration above.
#### BEFORE

`README.md`

```yaml
...
steps:
Expand All @@ -102,7 +100,9 @@ Creating a new release `v6.8 -> v7` using the recommended configuration above.
```

#### AFTER

`README.md`

```yaml
...
steps:
Expand All @@ -113,9 +113,7 @@ Creating a new release `v6.8 -> v7` using the recommended configuration above.
uses: tj-actions/sync-release-version@v7
```


Inputs
------
## Inputs

| Input | type | required | default | description |
|:-----------------:|:-------------:|:-------------:|:-----------------------:|:---------------------------------------------------------------:|
Expand All @@ -125,54 +123,42 @@ Inputs
| `paths` | `array` | `true` | | A list of file names to search <br /> and replace versions. |
| `pattern` | `string` | `false` | `''` | The pattern to match the location <br /> that needs to be updated |



Output
------
## Output

| Output | type | example | description |
|:----------------:|:-----------:|:---------------------:|:-----------------------------:|
| `is_initial_release` | `string` | `true` OR `false` | Boolean string indicating that it's an initial release. |
| `new_version` | `string` | `1.2.1` | The current project version |
| `old_version` | `string` | `1.2.0` | The previous project version |



* Free software: [MIT license](LICENSE)
* Free software: [MIT license](LICENSE)

If you feel generous and want to show some extra appreciation:

[![Buy me a coffee][buymeacoffee-shield]][buymeacoffee]

[buymeacoffee]: https://www.buymeacoffee.com/jackton1
[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png

[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png

Features
--------
## Features

* Modifies files with an up to date version of your project based on each release tag.
* Modifies files with an up to date version of your project based on each release tag.

## Known Issues

Known Issues
------------
> To ignore certain lines from getting updated ensure the version used doesn't match either the current or previous version.


Credits
-------
## Credits

This package was created with [Cookiecutter](https://github.com/cookiecutter/cookiecutter).



Report Bugs
-----------
## Report Bugs

Report bugs at https://github.com/tj-actions/sync-release-version/issues.

If you are reporting a bug, please include:

* Your operating system name and version.
* Any details about your workflow that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.
* Your operating system name and version.
* Any details about your workflow that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.