-
-
Notifications
You must be signed in to change notification settings - Fork 193
33 lines (32 loc) · 1.5 KB
/
release.yml
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
on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: echo "::set-output name=VERSION::${GITHUB_REF#refs/tags/}"
id: version
- run: |
notes="$(sed --quiet '/^## ${{ steps.version.outputs.VERSION }}/,/^## /{/^## /b;p}' CHANGELOG.md)"
notes="${notes//'%'/'%25'}"
notes="${notes//$'\n'/'%0A'}"
notes="${notes//$'\r'/'%0D'}"
echo ::set-output name=NOTES::$notes
id: notes
- run: '[ -n "${{ steps.notes.outputs.NOTES }}" ] || (echo "Failed to parse changelog" && exit 1)'
- run: grep --quiet '^AC_INIT(\[blueman\], \[${{ steps.version.outputs.VERSION }}\]' configure.ac || (echo "Did not find expected version in configure.ac" && exit 1)
- run: "grep --quiet \"version: '${{ steps.version.outputs.VERSION }}'\" meson.build || (echo 'Did not find expected version in meson.build' && exit 1)"
- run: sudo apt-get update
- run: sudo apt-get install -y -qq --no-install-recommends automake autoconf libtool autopoint gettext cython3 libglib2.0-dev python3-dev python-gi-dev libbluetooth-dev
- run: CYTHONEXEC=cython3 ./autogen.sh
- run: CYTHONEXEC=cython3 make distcheck
- uses: softprops/action-gh-release@v2
with:
draft: true
body: ${{ steps.notes.outputs.NOTES }}
files: |
blueman-${{ steps.version.outputs.VERSION }}.tar.xz
blueman-${{ steps.version.outputs.VERSION }}.tar.gz