File tree Expand file tree Collapse file tree 11 files changed +499
-604
lines changed Expand file tree Collapse file tree 11 files changed +499
-604
lines changed Original file line number Diff line number Diff line change
1
+ # Build new manpages on every release. To avoid too complicated workflows, we
2
+ # will generate the manpages when we add the label "manpages" in our pull request,
3
+ # indicating that this pull request will be one that will be released.
4
+
5
+ name : " Release"
6
+
7
+ on :
8
+ push :
9
+ tags : ["*"]
10
+
11
+ permissions :
12
+ contents : write
13
+
14
+ jobs :
15
+ build :
16
+ name : Generate tarball
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - uses : olegtarasov/get-tag@v2.1
20
+ id : tagName
21
+ with :
22
+ tagRegex : " v(.*)" # Optional. Returns specified group text as tag name. Full tag string is returned if regex is not defined.
23
+ tagRegexGroup : 1 # Optional. Default is 1.
24
+
25
+ - uses : actions/checkout@v4
26
+
27
+ - uses : actions/setup-python@v5
28
+
29
+ - name : Install dependencies
30
+ run : |
31
+ # TODO(r0x0d): Refactor this https://issues.redhat.com/browse/RSPEED-339
32
+ sudo apt update -y
33
+ sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-4.0 -y
34
+ make install
35
+
36
+ - name : Generate manpages
37
+ run : |
38
+ echo "$(poetry env info -p)/bin" >> $GITHUB_PATH
39
+ SPHINXBUILD=$(poetry env info -p)/bin/sphinx-build make man
40
+
41
+ - name : Generate distribution tarball
42
+ run : |
43
+ mkdir dist && make distribution-tarball
44
+ sudo mv *.tar.gz dist/
45
+ env :
46
+ VERSION : ' ${{ steps.tagName.outputs.tag }}'
47
+
48
+ - name : Upload binaries to release
49
+ uses : svenstaro/upload-release-action@v2
50
+ with :
51
+ repo_token : ${{ secrets.GITHUB_TOKEN }}
52
+ file : dist/*
53
+ tag : ${{ github.ref }}
54
+ overwrite : true
55
+ file_glob : true
Original file line number Diff line number Diff line change @@ -35,3 +35,6 @@ data/release/selinux/clad.pp
35
35
data /release /selinux /clad.pp.bz2
36
36
data /release /selinux /clad.cil
37
37
data /release /selinux /tmp
38
+
39
+ # Tarball
40
+ * .tar.gz
Original file line number Diff line number Diff line change 11
11
reload-clad \
12
12
manpages \
13
13
docs \
14
+ distribution-tarball \
15
+ html-docs
14
16
15
17
# Project directory path - /home/<user>/.../command-line-assistant
16
18
PROJECT_DIR := $(shell pwd)
@@ -29,6 +31,9 @@ SYSTEMD_USER_UNITS := ~/.config/systemd/user
29
31
# Path to local XDG_CONFIG_DIRS to load config file
30
32
XDG_CONFIG_DIRS := $(subst /,\/,$(DATA_DEVELOPMENT_PATH ) /config)
31
33
34
+ PKGNAME := command-line-assistant
35
+ VERSION := 0.2.2
36
+
32
37
default : help
33
38
34
39
install-tools : # # Install required utilities/tools
@@ -77,7 +82,8 @@ clean: ## Clean project files
77
82
dist \
78
83
.tox \
79
84
junit.xml \
80
- coverage.xml
85
+ coverage.xml \
86
+ $(PKGNAME ) -$(VERSION ) .tar.gz
81
87
$(MAKE ) -C docs clean
82
88
$(MAKE ) -C data/release/selinux
83
89
@@ -113,3 +119,22 @@ man: ## Build manpages
113
119
114
120
html-docs : # # Build html docs
115
121
$(MAKE ) -C docs html
122
+
123
+ distribution-tarball : clean # # Generate distribution tarball
124
+ tar --create \
125
+ --gzip \
126
+ --file /tmp/$(PKGNAME ) -$(VERSION ) .tar.gz \
127
+ --exclude=.git \
128
+ --exclude=.vscode \
129
+ --exclude=.github \
130
+ --exclude=.gitignore \
131
+ --exclude=.copr \
132
+ --exclude=.venv \
133
+ --exclude=.ruff_cache \
134
+ --exclude=data/development \
135
+ --exclude=scripts \
136
+ --exclude=docs \
137
+ --exclude=tests \
138
+ --exclude=.roproject \
139
+ --transform s/^\. /$(PKGNAME ) -$(VERSION ) / \
140
+ . && mv /tmp/$(PKGNAME ) -$(VERSION ) .tar.gz .
You can’t perform that action at this time.
0 commit comments