From a5f7f157301f9a7de6418c052cc84b072e6cf44d Mon Sep 17 00:00:00 2001 From: levalup Date: Sun, 16 Jun 2024 15:00:41 +0800 Subject: [PATCH] add create release action add change log. --- .github/workflows/create-release.yml | 55 ++++++++++++++++++++++++++++ CHANGELOG.md | 19 ++++++++++ README.md | 6 ++- 3 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/create-release.yml create mode 100644 CHANGELOG.md diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..318a49e --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,55 @@ +# Libuvcxx is a header only library, so only the source code needs to be packaged. + +name: Create Release and Upload Asset + +on: + workflow_run: + workflows: ["CMake on multiple platforms"] + branches: [master] + types: + - completed + +jobs: + create-release: + if: ${{ github.event.workflow_run.conclusion == 'success' && startsWith(github.ref, 'refs/tags/r') }} + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Package project files + if: success() + run: | + zip -r archives.zip examples/ include/ tests/ CHANGELOG.md LICENSE README.md + + - name: Get the tag name + if: success() + id: get_tag + run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/} + + - name: Create Release + if: success() + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.get_tag.outputs.TAG }} + release_name: Release ${{ steps.get_tag.outputs.TAG }} + body: | + See the CHANGELOG.md for details on this release. + draft: false + prerelease: false + + - name: Upload Release Asset + if: success() + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./archives.zip + asset_name: libuvcxx-${{ steps.get_tag.outputs.TAG }}.zip + asset_content_type: application/zip diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..b685286 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,19 @@ +# libuvcxx changelog + +## v0.0.1 + +> Date: 2024-06-16 + +### New features + +- The inheritance relationship of objects is basically stable, but there are still some interfaces that need to be encapsulated, and the details of encapsulation may also change. + +### Bug fix + +### Break changes + +### Notice + +### Future plan + +- Encapsulate some necessary classes and add usage examples. diff --git a/README.md b/README.md index 5c04082..e3f7cda 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,10 @@ [![License](https://img.shields.io/badge/License-MIT-blue.svg?logo=)](LICENSE) [![libuv](https://img.shields.io/badge/libuv-v1.48.0-green?logo=libuv&logoColor=green)](https://github.com/libuv/libuv) -[![libuv](https://img.shields.io/badge/C++-17-%23512BD4.svg?logo=C%2B%2B&logoColor=%23512BD4)](https://en.cppreference.com/w/cpp/17) -[![libuv](https://img.shields.io/badge/CMake-v3.9-%23064F8C?logo=cmake&logoColor=%23064F8C)](https://cmake.org) +[![C++](https://img.shields.io/badge/C++-17-%23512BD4.svg?logo=C%2B%2B&logoColor=%23512BD4)](https://en.cppreference.com/w/cpp/17) +[![CMake](https://img.shields.io/badge/CMake-v3.9-%23064F8C?logo=cmake&logoColor=%23064F8C)](https://cmake.org) + +[![build](https://img.shields.io/github/check-runs/levalup/libuvcxx/master)]() > C++ wrapper for libuv, header only.