-
Notifications
You must be signed in to change notification settings - Fork 1
131 lines (112 loc) · 4.68 KB
/
release-linux.yml
File metadata and controls
131 lines (112 loc) · 4.68 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: release linux
on:
push:
tags:
- 'release-*'
- 'v*'
jobs:
build-linux-release:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository.
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Move to the parent directory and fetch dependencies.
- name: Fetch dependencies
run: |
cd ..
git clone https://github.com/razterizer/Core.git
# Step 3: Build project.
- name: Build project
run: |
cd Examples
./build_examples.sh
continue-on-error: false
# Step 4: Upload build artifact.
- name: Upload Linux build artifact
uses: actions/upload-artifact@v4
with:
name: termin8or_examples-glibc2.38
path: Examples/bin/
retention-days: 1
build-legacy-linux-release:
runs-on: ubuntu-22.04
steps:
# Step 1: Checkout the repository.
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Move to the parent directory and fetch dependencies.
- name: Fetch dependencies
run: |
cd ..
git clone https://github.com/razterizer/Core.git
# Step 3: Build project.
- name: Build project
run: |
cd Examples
./build_examples.sh
continue-on-error: false
# Step 4: Upload build artifact.
- name: Upload Legacy Linux build artifact
uses: actions/upload-artifact@v4
with:
name: termin8or_examples-glibc2.35
path: Examples/bin/
retention-days: 1
create-linux-release:
runs-on: ubuntu-latest
needs: [build-linux-release, build-legacy-linux-release]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download GLIBC 2.38 build
uses: actions/download-artifact@v4
with:
name: termin8or_examples-glibc2.38
path: glibc2.38
- name: Download GLIBC 2.35 build
uses: actions/download-artifact@v4
with:
name: termin8or_examples-glibc2.35
path: glibc2.35
- name: Create combined Linux distribution package
run: |
mkdir termin8or_examples-${{ github.ref_name }}
cp glibc2.38/examples termin8or_examples-${{ github.ref_name }}/examples-glibc2.38
cp glibc2.35/examples termin8or_examples-${{ github.ref_name }}/examples-glibc2.35
# Copy background.tx and colors.tx
cp -r glibc2.38/background.tx termin8or_examples-${{ github.ref_name }}/
cp -r glibc2.38/colors.tx termin8or_examples-${{ github.ref_name }}/
echo "This package contains two binaries:" > termin8or_examples-${{ github.ref_name }}/README.txt
echo "- examples-glibc2.38: for modern systems (Ubuntu 24.04+, Arch Linux)" >> termin8or_examples-${{ github.ref_name }}/README.txt
echo "- examples-glibc2.35: for legacy systems (WSL, Ubuntu 22.04)" >> termin8or_examples-${{ github.ref_name }}/README.txt
echo "" >> termin8or_examples-${{ github.ref_name }}/README.txt
echo "Run the binary that matches your system's glibc version." >> termin8or_examples-${{ github.ref_name }}/README.txt
echo "" >> termin8or_examples-${{ github.ref_name }}/README.txt
echo "To run either executable, you might have to first do:" >> termin8or_examples-${{ github.ref_name }}/README.txt
echo " chmod ugo+x examples-glibc2.38" >> termin8or_examples-${{ github.ref_name }}/README.txt
echo " or:" >> termin8or_examples-${{ github.ref_name }}/README.txt
echo " chmod ugo+x examples-glibc2.35" >> termin8or_examples-${{ github.ref_name }}/README.txt
tar -czf termin8or_examples-${{ github.ref_name }}-linux.tar.gz termin8or_examples-${{ github.ref_name }}/
- name: Extract tag annotation as release notes
id: notes
run: |
git fetch --tags --force
TAG="${{ github.ref_name }}"
git tag -l --format='%(contents)' "$TAG" > RELEASE_NOTES.txt
echo "Release notes extracted from tag annotation:"
cat RELEASE_NOTES.txt
- name: Show ref info
run: |
echo "github.ref: ${{ github.ref }}"
echo "github.ref_name: ${{ github.ref_name }}"
echo "github.event_name: ${{ github.event_name }}"
- name: Upload package to release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref_name }}
artifacts: termin8or_examples-${{ github.ref_name }}-linux.tar.gz
allowUpdates: true
bodyFile: RELEASE_NOTES.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}