Skip to content

release.sh: Drop version-bump commit logic #13

release.sh: Drop version-bump commit logic

release.sh: Drop version-bump commit logic #13

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
create-release:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Get tag name
id: tag
run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
- name: Install git-cliff
run: |
URL=$(gh release view --repo orhun/git-cliff --json assets \
--jq '.assets[] | select(.name | test("x86_64-unknown-linux-gnu.tar.gz$")) | .url')
curl -sL "$URL" | tar -xz -C /usr/local/bin --strip-components=1 --wildcards '*/git-cliff'
env:
GH_TOKEN: ${{ github.token }}
- name: Generate changelog
run: |
git-cliff --config cliff.toml --latest --strip header \
> /tmp/release-notes.md
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ steps.tag.outputs.tag }}
run: |
gh release create "$TAG" \
--title "$TAG" \
--notes-file /tmp/release-notes.md
build-rpm:
needs: create-release
runs-on: ubuntu-latest
container: fedora:43
steps:
- uses: actions/checkout@v5
- name: Install dependencies
run: dnf install -y rpm-build make gcc python3 curl git
- name: Build RPM
run: make rpm
- name: Upload RPM to release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ needs.create-release.outputs.tag }}
run: |
dnf install -y gh
gh release upload "$TAG" \
rpmbuild/RPMS/noarch/*.rpm \
--repo "${{ github.repository }}"
build-deb:
needs: create-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y dpkg-dev make gcc python3 curl
- name: Build DEB
run: make deb
- name: Upload DEB to release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ needs.create-release.outputs.tag }}
run: |
gh release upload "$TAG" \
*.deb