-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a430fd3
commit 7c3791f
Showing
1 changed file
with
33 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,15 +24,39 @@ The incremented version. | |
|
||
## Example usage | ||
|
||
- name: Bump release version | ||
id: bump_version | ||
uses: christian-draeger/[email protected] | ||
with: | ||
current-version: '2.11.7-alpha.3' # also accepted: 'v2.11.7-alpha.3' | '2.11.7-alpha3' | ||
version-fragment: 'feature' | ||
- name: Do something with your bumped release version | ||
run: echo ${{ steps.bump_version.outputs.next-version }} | ||
# will print 2.12.0 | ||
name: Update Version | ||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
CURRENT_VERSION_TOP_LEVEL: 'v2.11.7-alpha.3' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Bump release version | ||
id: bump_version | ||
uses: christian-draeger/[email protected] | ||
with: | ||
current-version: ${{ env.CURRENT_VERSION_TOP_LEVEL }} # also accepted: 'v2.11.7-alpha.3' | '2.11.7-alpha3' | ||
version-fragment: 'feature' | ||
- name: Do something with your bumped release version | ||
run: echo ${{ steps.bump_version.outputs.next-version }} # will print 2.12.0 | ||
env-set-in-job: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: set current version from file | ||
id: set_current_version | ||
run: echo "::set-env name=CURRENT_VERSION::$(cat version.txt)" | ||
- name: Bump release version | ||
id: bump_version | ||
uses: christian-draeger/[email protected] | ||
with: | ||
current-version: ${{ env.CURRENT_VERSION }} # also accepted: 'v2.11.7-alpha.3' | '2.11.7-alpha3' | ||
version-fragment: 'feature' | ||
- name: Do something with your bumped release version | ||
run: echo ${{ steps.bump_version.outputs.next-version }} # will print 2.12.0 | ||
## input / output Examples | ||
|
||
|