Skip to content

Commit eac6a71

Browse files
authored
Merge pull request neutrinolabs#3480 from metalefty/actions-release-tarball
Add GitHub Actions to generate release tarball
2 parents aeb0b6d + 5a7d9a2 commit eac6a71

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/release-tarball.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Generate release tarball
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Tag to build'
8+
required: true
9+
10+
jobs:
11+
build:
12+
name: Generate release tarball (${{ github.event.repository.name }} ${{ github.event.inputs.tag }})
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Set timestamp
17+
run: echo "timestamp=$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_ENV
18+
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
ref: ${{ github.event.inputs.tag }}
23+
24+
- name: Install dependencies
25+
run: |
26+
sudo scripts/install_xrdp_build_dependencies_with_apt.sh min amd64
27+
28+
- name: Run make distcheck
29+
run: |
30+
./bootstrap
31+
./configure
32+
make distcheck
33+
34+
- name: Find generated tarball
35+
id: find_tarball
36+
run: |
37+
TARBALL=$(find . -maxdepth 1 -name "*.tar.gz" | head -n 1)
38+
if [ -z "$TARBALL" ]; then
39+
echo "Error: No tarball found" >&2
40+
exit 1
41+
fi
42+
echo "tarball=$TARBALL" >> $GITHUB_ENV
43+
44+
- name: Upload Artifact
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: ${{ github.event.repository.name }}-${{ github.event.inputs.tag }}-${{ env.timestamp }}
48+
path: "${{ env.tarball }}"
49+
if-no-files-found: error
50+
compression-level: 0
51+
retention-days: 7
52+

0 commit comments

Comments
 (0)