mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
59 lines
2.4 KiB
YAML
59 lines
2.4 KiB
YAML
name: Reusable Release
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
ffversion:
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: get latest release version
|
|
id: get_version_release
|
|
uses: pozetroninc/github-action-get-latest-release@master
|
|
with:
|
|
repository: ${{ github.repository }}
|
|
|
|
- name: download artifacts
|
|
if: inputs.ffversion != steps.get_version_release.outputs.release
|
|
uses: actions/download-artifact@v8
|
|
|
|
- name: create release
|
|
if: inputs.ffversion != steps.get_version_release.outputs.release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
tag: ${{ inputs.ffversion }}
|
|
commit: ${{ github.sha }}
|
|
artifactErrorsFailBuild: true
|
|
artifacts: fastfetch-*/fastfetch-*
|
|
body: "Please refer to [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/${{ inputs.ffversion }}/CHANGELOG.md) for details."
|
|
|
|
- name: download source tarballs
|
|
if: inputs.ffversion != steps.get_version_release.outputs.release
|
|
run: |
|
|
for i in 1 2 3 4 5; do curl -L --remote-name-all --output-dir fastfetch-source --create-dirs https://github.com/${{ github.repository }}/archive/refs/tags/${{ inputs.ffversion }}.{tar.gz,zip} && break || sleep 5; done
|
|
ls fastfetch-*/*
|
|
|
|
- name: generate release notes
|
|
if: inputs.ffversion != steps.get_version_release.outputs.release
|
|
run: |
|
|
echo "Please refer to [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/${{ inputs.ffversion }}/CHANGELOG.md) for details." > fastfetch-release-notes.md
|
|
echo -e "\n---\n\n<details><summary>SHA256SUMs</summary><br>\n\n\`\`\`" >> fastfetch-release-notes.md
|
|
sha256sum fastfetch-*/* >> fastfetch-release-notes.md
|
|
echo -e "\`\`\`\n</details>" >> fastfetch-release-notes.md
|
|
echo -e "\n<details><summary>SHA512SUMs</summary><br>\n\n\`\`\`" >> fastfetch-release-notes.md
|
|
sha512sum fastfetch-*/* >> fastfetch-release-notes.md
|
|
echo -e "\`\`\`\n</details>" >> fastfetch-release-notes.md
|
|
|
|
- name: update release body
|
|
if: inputs.ffversion != steps.get_version_release.outputs.release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
tag: ${{ inputs.ffversion }}
|
|
commit: ${{ github.sha }}
|
|
bodyFile: fastfetch-release-notes.md
|
|
allowUpdates: true
|