Skip to content

Commit 3c3fdc9

Browse files
committed
Initial GitHub action for CentOS 8 CI.
1 parent f110979 commit 3c3fdc9

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/ci-8.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI 8
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Dependencies
13+
run: |
14+
sudo apt-get update
15+
sudo apt-get -y install qemu-utils
16+
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Build
21+
run: |
22+
chmod +x ./build.sh
23+
./build.sh
24+
25+
- name: Release
26+
run: |
27+
GIT_TAG="${GITHUB_REF#refs/tags/}"
28+
GIT_TAG_ESCAPED=$(printf '%s' "${GIT_TAG}" | sed 's/[][\.|$(){}?+*^]/\\&/g')
29+
GIT_TAG_HASH=$(git ls-remote --tags origin | grep -m 1 "refs/tags/${GIT_TAG_ESCAPED}\$" | cut -f 1)
30+
GIT_TAG_MESSAGE=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${GITHUB_REPOSITORY}/git/tags/${GIT_TAG_HASH}" | jq -r '.message' | sed -n '/-----BEGIN PGP SIGNATURE-----/q;p')
31+
RELEASE_NOTES='!'"[](https://img.shields.io/github/downloads/${GITHUB_REPOSITORY}/${GIT_TAG}/total)"$'\n\n'"${GIT_TAG_MESSAGE}"
32+
gh release create "${GIT_TAG}" --notes "${RELEASE_NOTES}" --title "CentOS ${GIT_TAG}" ./wsl/dist/*.zip
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)