misc: Automated releases generation (#1805)

This commit is contained in:
Roman Kelesidis 2025-02-06 17:57:06 +03:00 committed by GitHub
commit 425e2e87d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,12 +8,13 @@ on:
jobs:
changelog:
runs-on: ubuntu-latest
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master
token: ${{ secrets.REPO_TOKEN }}
- name: Generate a changelog
@ -69,3 +70,26 @@ jobs:
git commit -m "release(preparing): Update checksums.md5 📄"
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git master
fi
release:
name: Create release
needs:
- checksums
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
if: ${{ !contains(github.ref, '-') }}
run: cargo build --release
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/mything
asset_name: mything
file_glob: true
overwrite: true
tag: ${{ github.ref }}
release_name: "TorrentPier v${{ github.ref }}"
body: "${{ needs.generate-changelog.outputs.release_body }}"