diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..30ba3f71a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +on: + push: + tags: + - "v*" + +name: Create Release + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Extract body from changelog + run: | + NEW_VERSION=$(echo '${{ github.ref }}' | sed 's/refs\/tags\/v//') + echo $NEW_VERSION + sed -n -e "/## ${NEW_VERSION}/,/ extractedBody.md + - name: Create Release + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + bodyFile: "extractedBody.md"