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 18, 2023
1 parent e7fff87 commit e7492a4
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/update_latest_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,23 @@ jobs:
- name: Check out repository
uses: actions/checkout@v2

- name: Create and switch to new branch
- name: Extract version number
id: extract_version
run: |
git checkout -b update-latest-version
echo "::set-output name=version::${{ github.ref }}"
- name: Format version number
id: format_version
run: |
echo "::set-output name=formatted_version::${{ steps.extract_version.outputs.version#refs/tags/ }}"
- name: Update version
run: echo ${{ github.ref }} > latest_version.txt
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 origin update-latest-version
- name: Switch back to the default branch
run: git checkout ${{ github.ref }}
git push

0 comments on commit e7492a4

Please sign in to comment.