mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-16 14:17:37 -05:00
30 lines
838 B
YAML
30 lines
838 B
YAML
name: Publish
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
build:
|
|
name: Publish CPM.cmake
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set CPM version by tag
|
|
run: |
|
|
mkdir dist
|
|
sed -e "s/1.0.0-development-version/${GITHUB_REF/refs\/tags\/v}/g" cmake/CPM.cmake > dist/CPM.cmake
|
|
sed -e "s/1.0.0-development-version/${GITHUB_REF/refs\/tags\/v}/g" \
|
|
-e "s/CPM_HASH_SUM_PLACEHOLDER/$(sha256sum dist/CPM.cmake | cut -d' ' -f1)/" cmake/get_cpm.cmake > dist/get_cpm.cmake
|
|
|
|
- name: Upload CPM.cmake to release
|
|
uses: svenstaro/upload-release-action@v1-release
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
tag: ${{ github.ref }}
|
|
file: dist/*.cmake
|
|
file_glob: true
|
|
overwrite: true
|