-
Notifications
You must be signed in to change notification settings - Fork 35
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
Showing
1 changed file
with
2 additions
and
36 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 |
---|---|---|
@@ -1,36 +1,2 @@ | ||
name: Update Latest Version | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
update_version: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Extract version number | ||
id: extract_version | ||
run: | | ||
echo "::set-output name=version::${{ github.ref }}" | ||
- name: Format version number | ||
id: format_version | ||
run: | | ||
formatted_version=$(echo ${{ steps.extract_version.outputs.version }} | sed 's/refs\/tags\///') | ||
echo "::set-output name=formatted_version::$formatted_version" | ||
- name: Update version | ||
run: echo ${{ steps.format_version.outputs.formatted_version }} > latest_version.txt | ||
|
||
- name: Commit and push changes | ||
run: | | ||
git config user.name "GitHub Action" | ||
git config user.email "action@github.com" | ||
git add latest_version.txt | ||
git commit -m "Update latest version" | ||
git push | ||
- name: Tag/Release on Push Action | ||
uses: rymndhng/release-on-push-action@v0.27.0 |