-
Notifications
You must be signed in to change notification settings - Fork 14
88 lines (73 loc) · 2.21 KB
/
release-packages.yml
File metadata and controls
88 lines (73 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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