forked from vanessa-opensource/ovm
-
Notifications
You must be signed in to change notification settings - Fork 10
62 lines (51 loc) · 1.66 KB
/
release.yml
File metadata and controls
62 lines (51 loc) · 1.66 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
name: Release OVM
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up OneScript 1.9.2
uses: otymko/setup-onescript@v1.5
with:
version: 1.9.2
- name: Update opm
run: opm install opm@1.3.0
- name: Install local dependencies
run: opm install -l
- name: Build ovm.exe
run: oscript -make src/cmd/ovm.os ovm.exe
- name: Extract version from packagedef
id: get_version
run: |
VERSION=$(grep -oP '\.Версия\("\K[^"]+' packagedef || true)
if [ -z "$VERSION" ]; then
echo "Error: failed to extract version from packagedef."
exit 1
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Extracted version: $VERSION"
- name: Create dist directory
run: |
mkdir -p dist
chmod 777 dist
- name: Build Windows installer with Inno Setup
run: |
if [ ! -f "ovm.exe" ]; then
echo "Error: ovm.exe not found in workspace root. Ensure the 'Build ovm.exe' step completed successfully."
exit 1
fi
docker run --rm -i -v "$GITHUB_WORKSPACE:/work" -w /work amake/innosetup \
/DMyAppVersion="${{ steps.get_version.outputs.version }}" \
install/ovm.iss
- name: Upload release assets
uses: AButler/upload-release-assets@v2.0.2
with:
files: |
ovm.exe
dist/ovm-setup.exe
repo-token: ${{ secrets.GITHUB_TOKEN }}