mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 12:25:07 +00:00
.github: add workflow for github releases
when tag xlibre-xserver-* is pushed, automatically create a github release. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
bab9362335
commit
939ba0803c
17
.github/scripts/github/make-release
vendored
Executable file
17
.github/scripts/github/make-release
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
err() {
|
||||
echo "$0: $*"
|
||||
}
|
||||
|
||||
[ "$GITHUB_REPOSITORY" ] || err "missing variable GITHUB_REPOSITORY"
|
||||
|
||||
TITLE=$(git tag -l --format='%(contents)' $tag)
|
||||
|
||||
echo "tag=$tag"
|
||||
echo "title=$TITLE"
|
||||
|
||||
gh release create "$tag" \
|
||||
--repo="$GITHUB_REPOSITORY" \
|
||||
--title="$tag" \
|
||||
--generate-notes
|
||||
21
.github/workflows/release.yml
vendored
Normal file
21
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Publish release on github
|
||||
|
||||
on:
|
||||
push
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release pushed tag
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/xlibre-xserver-') }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Create release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ github.ref_name }}
|
||||
run: .github/scripts/github/make-release
|
||||
Reference in New Issue
Block a user