mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-24 07:05:47 -07:00
misc: Automated releases generation (#1805)
This commit is contained in:
parent
8f191582f9
commit
425e2e87d5
1 changed files with 25 additions and 1 deletions
26
.github/workflows/cd.yml
vendored
26
.github/workflows/cd.yml
vendored
|
@ -8,12 +8,13 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
changelog:
|
changelog:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
release_body: ${{ steps.git-cliff.outputs.content }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: master
|
|
||||||
token: ${{ secrets.REPO_TOKEN }}
|
token: ${{ secrets.REPO_TOKEN }}
|
||||||
|
|
||||||
- name: Generate a changelog
|
- name: Generate a changelog
|
||||||
|
@ -69,3 +70,26 @@ jobs:
|
||||||
git commit -m "release(preparing): Update checksums.md5 📄"
|
git commit -m "release(preparing): Update checksums.md5 📄"
|
||||||
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git master
|
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git master
|
||||||
fi
|
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 }}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue