Skip to content

Commit

Permalink
Merge pull request #992 from andev0/master
Browse files Browse the repository at this point in the history
  • Loading branch information
COM8 authored Dec 17, 2023
2 parents d501e11 + dcfaf05 commit 561db4f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/readme-updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Update GIT_TAG In Readme
on:
release:
types: [published]

# Workflow configuration
env:
OUTPUT_BRANCH: "master"
COMMIT_MESSAGE: "Update GIT_TAG on new release"

jobs:
update-git-tag:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
ref: ${{github.sha}}
- name: "Replace GIT_TAG"
run: sed -i -re 's/(GIT_TAG) [0-9a-f]+/\1 ${{github.sha}}/' README.md
- name: "Commit changes"
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: ${{env.COMMIT_MESSAGE}}
branch: ${{env.OUTPUT_BRANCH}}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Add the following to your `CMakeLists.txt`.
```cmake
include(FetchContent)
FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git
GIT_TAG 0817715923c9705e68994eb52ef9df3f6845beba) # The commit hash for 1.10.x. Replace with the latest from: https://github.com/libcpr/cpr/releases
GIT_TAG 3b15fa82ea74739b574d705fea44959b58142eb8) # Replace with your desired git commit from: https://github.com/libcpr/cpr/releases
FetchContent_MakeAvailable(cpr)
```

Expand Down

0 comments on commit 561db4f

Please sign in to comment.