From c1a6502284928d6e22be644139e5cf55f6f1f856 Mon Sep 17 00:00:00 2001 From: abuyoyo Date: Mon, 16 May 2022 22:51:20 +0300 Subject: [PATCH] GitHub action: create-github-release on push tag --- .github/workflows/create-github-release.yml | 38 +++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/create-github-release.yml diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml new file mode 100644 index 0000000..b61fa37 --- /dev/null +++ b/.github/workflows/create-github-release.yml @@ -0,0 +1,38 @@ +# Create Github Release +# v1.0 +# Create Github release on tag push +# - Use tag name as release title +# - Use CHANGELOG.md log entry as body + +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - '*' # Match any tag + +name: Create Release + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Get Changelog Entry + id: changelog_reader + uses: mindsers/changelog-reader-action@v1.1.0 + with: + version: ${{ github.ref }} + path: ./CHANGELOG.md + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + body: ${{ steps.changelog_reader.outputs.log_entry }} # This pulls from the GET CHANGELOG ENTRY step above, referencing it's ID to get its outputs object, which include a `log_entry`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + draft: false + prerelease: false \ No newline at end of file