diff --git a/.github/workflows/pr-and-release-build.yml b/.github/workflows/pr-and-release-build.yml index fb67529..3677594 100644 --- a/.github/workflows/pr-and-release-build.yml +++ b/.github/workflows/pr-and-release-build.yml @@ -82,8 +82,7 @@ jobs: dist/pkg - name: Chocolatey Push - # publish release if tags are pushed - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') # if tags are pushed, build and publish release uses: ./.github/shared/docker-chocolatey with: command: make push-chocolatey @@ -91,8 +90,7 @@ jobs: CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }} - name: "Upload sidecar artifacts to S3" - # publish release if tags are pushed - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') # if tags are pushed, build and publish release env: AWS_DEFAULT_REGION: "eu-west-1" AWS_ACCESS_KEY_ID: ${{ secrets.AWS_SIDECAR_RELEASES_KEY_ID }} @@ -100,8 +98,11 @@ jobs: run: | aws s3 cp --no-progress --recursive dist/pkg s3://graylog2-releases/graylog-collector-sidecar/${{ github.ref_name }}/ + - name: "Render changelog" + if: startsWith(github.ref, 'refs/tags/') # if tags are pushed, build and publish release + run: graylog-project changelog render --skip-header changelog/${{ github.ref_name }} > ${{ runner.temp }}/changelog.md + - name: "Releasing to Github" - # publish release if tags are pushed - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') # if tags are pushed, build and publish release run: | - gh release create ${{ github.ref_name }} --draft --notes "Insert changes here." dist/pkg/* + gh release create ${{ github.ref_name }} --draft -F ${{ runner.temp }}/changelog.md dist/pkg/*