From edd677e778e9532a665c1722f6fedda2d9631654 Mon Sep 17 00:00:00 2001 From: Mist Date: Thu, 8 Feb 2024 23:58:07 +0800 Subject: [PATCH] [Feat] release actions --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++++ project.toml | 4 ++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 project.toml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..bbda05f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: 'Release' + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Read version from project config + id: read_toml + uses: SebRollen/toml-action@v1.0.2 + with: + file: project.toml + field: project.version + + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + custom_tag: ${{ read_toml.outputs.value }} + + - name: Create a GitHub release + uses: ncipollo/release-action@v1 + with: + tag: ${{ steps.tag_version.outputs.new_tag }} + name: Release ${{ steps.tag_version.outputs.new_tag }} + body: ${{ steps.tag_version.outputs.changelog }} + diff --git a/project.toml b/project.toml new file mode 100644 index 0000000..1bb956e --- /dev/null +++ b/project.toml @@ -0,0 +1,4 @@ +[project] +name = "plugin-name" +version = "0.0.1" +description = "description"