-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix update release url pipeline (janhq#941)
* update-release-url pipeline add trigger commit to git if github event is release * Remove v in release tag * Change job name and add checkout step --------- Co-authored-by: Hien To <[email protected]>
- Loading branch information
1 parent
074b18d
commit 0e52ba8
Showing
3 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,17 +18,24 @@ jobs: | |
- name: Get Latest Release | ||
uses: pozetroninc/[email protected] | ||
id: get-latest-release | ||
with: | ||
repository: ${{ github.repository }} | ||
|
||
- name: Update Download URLs in README.md | ||
run: | | ||
echo "Latest Release: ${{ steps.get-latest-release.outputs.release }}" | ||
release=$(/bin/echo -n "${{ steps.get-latest-release.outputs.release }}") | ||
tag=$(/bin/echo -n "${{ steps.get-latest-release.outputs.release }}") | ||
echo "Tag: $tag" | ||
# Remove the v prefix | ||
release=${tag:1} | ||
echo "Release: $release" | ||
sed -i "s|<a href='https://github.com/janhq/jan/releases/download/v.*/jan-win-x64-.*'>|<a href='https://github.com/janhq/jan/releases/download/v${release}/jan-win-x64-${release}.exe'>|" README.md | ||
sed -i "s|<a href='https://github.com/janhq/jan/releases/download/v.*/jan-mac-x64-.*'>|<a href='https://github.com/janhq/jan/releases/download/v${release}/jan-mac-x64-${release}.dmg'>|" README.md | ||
sed -i "s|<a href='https://github.com/janhq/jan/releases/download/v.*/jan-mac-arm64-.*'>|<a href='https://github.com/janhq/jan/releases/download/v${release}/jan-mac-arm64-${release}.dmg'>|" README.md | ||
sed -i "s|<a href='https://github.com/janhq/jan/releases/download/v.*/jan-linux-amd64-.*'>|<a href='https://github.com/janhq/jan/releases/download/v${release}/jan-linux-amd64-${release}.deb'>|" README.md | ||
- name: Commit and Push changes | ||
if: github.event_name == 'release' | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Service Account" | ||
|
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