Skip to content

Commit

Permalink
Fix more issues
Browse files Browse the repository at this point in the history
- use | for executing script one after the other
- use `#` as a delimiter in sed instead of `/`, because `/` are also
  part of links
- set name & email, necessary for committing
  • Loading branch information
subhoghoshX committed Jul 28, 2024
1 parent 0aad8bc commit 555f5a3
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/update-download-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Update
run:
run: |
version=$(git describe --tags --abbrev=0)
new_link="https://github.com/subhoghoshX/Samay/releases/download/$version/samay-$version.zip"
sed -i "s/\[zip file\](.*)/\[zip file\]\($new_link\)/g" README.md
sed -i "s#\[zip file\](.*)#\[zip file\]\($new_link\)#g" README.md
# Sent PR
- run: git add .
- run: git commit -m "Update download link"
- run: gh pr create -B "update-link-for-$version" -H main --title 'Update download link' --body 'Created by Github action'
- name: Send PR
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Update download link"
gh pr create -B "update-link-for-$version" -H main --title 'Update download link' --body 'Created by Github action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 555f5a3

Please sign in to comment.