An open API service indexing awesome lists of open source software.

https://github.com/sliker/update-package-version-from-release-branch

Automatically update the package version based on the branch name when there is a push to a release branch. This action extracts the version from the branch name and updates the package version accordingly. It enables automated versioning for your project's release branches, eliminating the need for manual version management.
https://github.com/sliker/update-package-version-from-release-branch

Last synced: about 2 months ago
JSON representation

Automatically update the package version based on the branch name when there is a push to a release branch. This action extracts the version from the branch name and updates the package version accordingly. It enables automated versioning for your project's release branches, eliminating the need for manual version management.

Awesome Lists containing this project

README

        

# update-package-version-from-release-branch

[![GitHub Super-Linter](https://github.com/actions/javascript-action/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)
![CI](https://github.com/actions/javascript-action/actions/workflows/ci.yml/badge.svg)

## Usage

**Non-protected branch**:

```yaml
name: Bump package version
on:
push:
branches:
- 'release/**'

permissions:
contents: write

jobs:
bump:
name: Bump package version
runs-on: ubuntu-latest

steps:
- name: Checkout source code
id: checkout
uses: actions/checkout@v4
- name: Update Package Version
uses: sliker/[email protected]
```

**Protected branch**:

```yaml
name: Bump package version
on:
push:
branches:
- 'release/**'

permissions:
contents: write

jobs:
bump:
name: Bump package version
runs-on: ubuntu-latest

steps:
- name: Checkout source code
id: checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GB_TOKEN }}
- name: Update Package Version
uses: sliker/[email protected]
```