From 90558aa9cbdbb6a14a00add8c81bf03538e1cd20 Mon Sep 17 00:00:00 2001 From: Lars Melchior Date: Mon, 16 Mar 2020 20:37:30 +0100 Subject: [PATCH] Add GitHub action to publish CPM on release (#102) * add github action to publish cpm on release * add checkout step * update readme --- .github/workflows/publish.yaml | 21 +++++++++++++++++++++ README.md | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..2262b2d --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,21 @@ +name: Publish + +on: + push: + tags: + - '*' + +jobs: + build: + name: Publish CPM.cmake + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Upload CPM.cmake to release + uses: svenstaro/upload-release-action@v1-release + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: cmake/CPM.cmake + asset_name: CPM.cmake + tag: ${{ github.ref }} + overwrite: true diff --git a/README.md b/README.md index cfb92d9..632d78d 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ To add CPM to your current project, simply add `cmake/CPM.cmake` to your project ```bash mkdir -p cmake -wget -O cmake/CPM.cmake https://raw.githubusercontent.com/TheLartians/CPM.cmake/master/cmake/CPM.cmake +wget -O cmake/CPM.cmake https://github.com/TheLartians/CPM.cmake/releases/latest/download/CPM.cmake ``` You can also use CMake to download CPM for you. See the [wiki](https://github.com/TheLartians/CPM/wiki/Adding-CPM) for more details.