-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (28 loc) · 1.02 KB
/
update-download-link.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Update Download Link
on:
release:
types: [published]
jobs:
update-downlad-link:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update
run: |
version=$(git describe --tags --abbrev=0 | sed 's/v//')
new_link="https://github.com/subhoghoshX/Samay/releases/download/$version/samay-$version-chrome.zip"
sed -i "s#\[zip file\](.*)#\[zip file\]\($new_link\)#g" README.md
# Send PR
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b "update-link-for-$version"
git add .
git commit -m "Update download link"
git push origin "update-link-for-$version"
gh pr create -H "update-link-for-$version" -B main --title 'Update download link' --body 'Created by Github action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}