Skip to content

Commit

Permalink
Update update_latest_versions.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelteil committed May 19, 2023
1 parent f7ddf1d commit 5960607
Showing 1 changed file with 2 additions and 36 deletions.
38 changes: 2 additions & 36 deletions .github/workflows/update_latest_versions.yml
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

0 comments on commit 5960607

Please sign in to comment.