Auto generate changelog

pull/4/head
sgoudham 3 years ago
parent 63ce9e9fb2
commit 9043e2d9a9

@ -47,8 +47,11 @@ jobs:
7z a "${{ env.BIN }}.zip" "${{ env.BIN }}.exe" 7z a "${{ env.BIN }}.zip" "${{ env.BIN }}.exe"
mv "${{ env.BIN }}.zip" $GITHUB_WORKSPACE mv "${{ env.BIN }}.zip" $GITHUB_WORKSPACE
shell: bash shell: bash
# We're using a fork of `actions/create-release` that detects - name: "Build Changelog"
# whether a release is already available or not first. id: build_changelog
uses: mikepenz/release-changelog-builder-action@{latest-release}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: XAMPPRocky/create-release@v1.0.2 - uses: XAMPPRocky/create-release@v1.0.2
id: create_release id: create_release
env: env:
@ -56,8 +59,7 @@ jobs:
with: with:
tag_name: ${{ github.ref }} tag_name: ${{ github.ref }}
release_name: ${{ github.ref }} release_name: ${{ github.ref }}
# Draft should **always** be false. GitHub doesn't provide a way to body: ${{steps.github_release.outputs.changelog}}
# get draft releases from its API, so there's no point using it.
draft: false draft: false
prerelease: false prerelease: false
- uses: actions/upload-release-asset@v1 - uses: actions/upload-release-asset@v1
@ -88,6 +90,11 @@ jobs:
- run: scripts/set_rust_version.bash stable ${{ matrix.target }} - run: scripts/set_rust_version.bash stable ${{ matrix.target }}
- run: scripts/build.bash cross ${{ matrix.target }} RELEASE - run: scripts/build.bash cross ${{ matrix.target }} RELEASE
- run: tar -czvf ${{ env.BIN }}.tar.gz --directory=target/${{ matrix.target }}/release ${{ env.BIN }} - run: tar -czvf ${{ env.BIN }}.tar.gz --directory=target/${{ matrix.target }}/release ${{ env.BIN }}
- name: "Build Changelog"
id: build_changelog
uses: mikepenz/release-changelog-builder-action@{latest-release}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: XAMPPRocky/create-release@v1.0.2 - uses: XAMPPRocky/create-release@v1.0.2
id: create_release id: create_release
env: env:
@ -95,6 +102,7 @@ jobs:
with: with:
tag_name: ${{ github.ref }} tag_name: ${{ github.ref }}
release_name: ${{ github.ref }} release_name: ${{ github.ref }}
body: ${{steps.github_release.outputs.changelog}}
draft: false draft: false
prerelease: false prerelease: false
- uses: actions/upload-release-asset@v1 - uses: actions/upload-release-asset@v1
@ -138,6 +146,11 @@ jobs:
- run: scripts/set_rust_version.bash stable ${{ matrix.target }} - run: scripts/set_rust_version.bash stable ${{ matrix.target }}
- run: scripts/build.bash /tmp/cross ${{ matrix.target }} RELEASE - run: scripts/build.bash /tmp/cross ${{ matrix.target }} RELEASE
- run: tar -czvf ${{ env.BIN }}.tar.gz --directory=target/${{ matrix.target }}/release ${{ env.BIN }} - run: tar -czvf ${{ env.BIN }}.tar.gz --directory=target/${{ matrix.target }}/release ${{ env.BIN }}
- name: "Build Changelog"
id: build_changelog
uses: mikepenz/release-changelog-builder-action@{latest-release}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: XAMPPRocky/create-release@v1.0.2 - uses: XAMPPRocky/create-release@v1.0.2
id: create_release id: create_release
env: env:
@ -145,6 +158,7 @@ jobs:
with: with:
tag_name: ${{ github.ref }} tag_name: ${{ github.ref }}
release_name: ${{ github.ref }} release_name: ${{ github.ref }}
body: ${{steps.github_release.outputs.changelog}}
draft: false draft: false
prerelease: false prerelease: false
- name: Upload Release Asset - name: Upload Release Asset

Loading…
Cancel
Save