ODM 9.0.0.1 Release #8
Workflow file for this run
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
name: Create branch from release | |
on: | |
release: | |
types: [published] | |
jobs: | |
create-branch: | |
name: Create branch and update Download link in README | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Get branch name to create | |
run: | | |
tag_name="${{ github.event.release.tag_name }}" | |
echo "branch_name=${tag_name##*v}" >> $GITHUB_ENV | |
- name: Create branch | |
run: | | |
git checkout -b ${{ env.branch_name }} | |
- name: Udpate Download link in README | |
run: | | |
search="releases/latest/download" | |
replace="releases/download/${{ github.event.release.tag_name }}" | |
sed -i "s|${search}|${replace}|" contrib/validate-odm/README.md | |
- name: Setup git config | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
- name: Commit | |
run: | | |
git add contrib/validate-odm/README.md | |
git commit -m "Update Download link with tagged asset url for validate-odm script" | |
git push origin refs/heads/${{ env.branch_name }} |