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
|
name: tag
on:
push:
tags:
# this is a glob, not a regexp
- '[0-9]*'
jobs:
release:
runs-on: ubuntu-latest
permissions:
# create release
contents: write
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Clone repository
uses: actions/checkout@v5
with:
# need this to also fetch tags
fetch-depth: 0
- name: Workaround for https://github.com/actions/checkout/pull/697
run: git fetch --force origin $(git describe --tags):refs/tags/$(git describe --tags)
- name: Build release tarball
# run as root; current Ubuntu podman breaks user networking ("could not find slirp4netns")
run: sudo PUBLISH_TAR=1 tests/run-apt
- name: Create GitHub release
run: |
VERSION="${{ github.ref_name }}"
git tag -l --format='%(contents:body)' $VERSION > release-note.txt
gh release create --title $VERSION --notes-file release-note.txt $VERSION \
"umockdev-${VERSION}.tar.xz"
|