Skip to content

Commit f3d56ff

Browse files
committed
Merge branch 'release/v8.26'
2 parents 2e7d742 + 8589bf8 commit f3d56ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+2284
-1797
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,45 @@
11
name: Continuous Integration
22
on:
33
push:
4-
branches:
5-
- develop
4+
branches: [develop]
65
pull_request:
76
branches: [develop]
87
workflow_dispatch:
8+
workflow_call:
99
jobs:
10-
build-windows:
11-
name: Build Windows x64
12-
runs-on: windows-2019
13-
steps:
14-
- name: Checkout sources
15-
uses: actions/checkout@v4
16-
with:
17-
fetch-depth: 0
18-
- name: Setup .NET
19-
uses: actions/setup-dotnet@v4
20-
with:
21-
dotnet-version: 8.0.x
22-
- name: Build
23-
run: dotnet build -c Release
24-
- name: Publish
25-
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r win-x64
26-
- name: Upload Artifact
27-
uses: actions/upload-artifact@v4
28-
with:
29-
name: sourcegit.win-x64
30-
path: publish
31-
build-macos-intel:
32-
name: Build macOS (Intel)
33-
runs-on: macos-13
34-
steps:
35-
- name: Checkout sources
36-
uses: actions/checkout@v4
37-
with:
38-
fetch-depth: 0
39-
- name: Setup .NET
40-
uses: actions/setup-dotnet@v4
41-
with:
42-
dotnet-version: 8.0.x
43-
- name: Build
44-
run: dotnet build -c Release
45-
- name: Publish
46-
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r osx-x64
47-
- name: Packing Program
48-
run: tar -cvf sourcegit.osx-x64.tar -C publish/ .
49-
- name: Upload Artifact
50-
uses: actions/upload-artifact@v4
51-
with:
52-
name: sourcegit.osx-x64
53-
path: sourcegit.osx-x64.tar
54-
build-macos-arm64:
55-
name: Build macOS (Apple Silicon)
56-
runs-on: macos-latest
57-
steps:
58-
- name: Checkout sources
59-
uses: actions/checkout@v4
60-
with:
61-
fetch-depth: 0
62-
- name: Setup .NET
63-
uses: actions/setup-dotnet@v4
64-
with:
65-
dotnet-version: 8.0.x
66-
- name: Build
67-
run: dotnet build -c Release
68-
- name: Publish
69-
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r osx-arm64
70-
- name: Packing Program
71-
run: tar -cvf sourcegit.osx-arm64.tar -C publish/ .
72-
- name: Upload Artifact
73-
uses: actions/upload-artifact@v4
74-
with:
75-
name: sourcegit.osx-arm64
76-
path: sourcegit.osx-arm64.tar
77-
build-linux:
78-
name: Build Linux
79-
runs-on: ubuntu-20.04
10+
build:
11+
strategy:
12+
matrix:
13+
include:
14+
- name : Windows x64
15+
os: windows-2019
16+
runtime: win-x64
17+
- name : Windows ARM64
18+
os: windows-2019
19+
runtime: win-arm64
20+
- name : macOS (Intel)
21+
os: macos-13
22+
runtime: osx-x64
23+
- name : macOS (Apple Silicon)
24+
os: macos-latest
25+
runtime: osx-arm64
26+
- name : Linux
27+
os: ubuntu-20.04
28+
runtime: linux-x64
29+
- name : Linux (arm64)
30+
os: ubuntu-20.04
31+
runtime: linux-arm64
32+
name: Build ${{ matrix.name }}
33+
runs-on: ${{ matrix.os }}
8034
steps:
8135
- name: Checkout sources
8236
uses: actions/checkout@v4
83-
with:
84-
fetch-depth: 0
85-
- name: Setup .NET
86-
uses: actions/setup-dotnet@v4
87-
with:
88-
dotnet-version: 8.0.x
89-
- name: Build
90-
run: dotnet build -c Release
91-
- name: Publish
92-
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r linux-x64
93-
- name: Rename Executable File
94-
run: mv publish/SourceGit publish/sourcegit
95-
- name: Packing Program
96-
run: tar -cvf sourcegit.linux-x64.tar -C publish/ .
97-
- name: Upload Artifact
98-
uses: actions/upload-artifact@v4
99-
with:
100-
name: sourcegit.linux-x64
101-
path: sourcegit.linux-x64.tar
102-
build-linux-arm64:
103-
name: Build Linux (arm64)
104-
runs-on: ubuntu-20.04
105-
steps:
106-
- name: Checkout sources
107-
uses: actions/checkout@v4
108-
with:
109-
fetch-depth: 0
11037
- name: Setup .NET
11138
uses: actions/setup-dotnet@v4
11239
with:
11340
dotnet-version: 8.0.x
11441
- name: Configure arm64 packages
42+
if: ${{ matrix.runtime == 'linux-arm64' }}
11543
run: |
11644
sudo dpkg --add-architecture arm64
11745
echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted
@@ -121,19 +49,25 @@ jobs:
12149
sudo sed -i -e 's/^deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
12250
sudo sed -i -e 's/^deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list
12351
- name: Install cross-compiling dependencies
52+
if: ${{ matrix.runtime == 'linux-arm64' }}
12453
run: |
12554
sudo apt-get update
12655
sudo apt-get install clang llvm gcc-aarch64-linux-gnu zlib1g-dev:arm64
12756
- name: Build
12857
run: dotnet build -c Release
12958
- name: Publish
130-
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r linux-arm64
131-
- name: Rename Executable File
59+
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r ${{ matrix.runtime }}
60+
- name: Rename executable file
61+
if: ${{ startsWith(matrix.runtime, 'linux-') }}
13262
run: mv publish/SourceGit publish/sourcegit
133-
- name: Packing Program
134-
run: tar -cvf sourcegit.linux-arm64.tar -C publish/ .
135-
- name: Upload Artifact
63+
- name: Tar artifact
64+
if: ${{ startsWith(matrix.runtime, 'linux-') }}
65+
run: |
66+
tar -cvf "sourcegit.${{ matrix.runtime }}.tar" -C publish .
67+
rm -r publish/*
68+
mv "sourcegit.${{ matrix.runtime }}.tar" publish
69+
- name: Upload artifact
13670
uses: actions/upload-artifact@v4
13771
with:
138-
name: sourcegit.linux-arm64
139-
path: sourcegit.linux-arm64.tar
72+
name: sourcegit.${{ matrix.runtime }}
73+
path: publish

.github/workflows/package.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Package
2+
on:
3+
workflow_call:
4+
inputs:
5+
version:
6+
description: Source Git package version
7+
required: true
8+
type: string
9+
jobs:
10+
build:
11+
name: Build
12+
uses: ./.github/workflows/ci.yml
13+
windows-portable:
14+
name: Package portable Windows app
15+
needs: build
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
runtime: [win-x64, win-arm64]
20+
steps:
21+
- name: Checkout sources
22+
uses: actions/checkout@v4
23+
- name: Download build
24+
uses: actions/download-artifact@v4
25+
with:
26+
name: sourcegit.${{ matrix.runtime }}
27+
path: build/SourceGit
28+
- name: Package
29+
env:
30+
VERSION: ${{ inputs.version }}
31+
RUNTIME: ${{ matrix.runtime }}
32+
run: ./build/scripts/package.windows-portable.sh
33+
- name: Upload package artifact
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: package.${{ matrix.runtime }}
37+
path: build/sourcegit_*.zip
38+
osx-app:
39+
name: Package OSX app
40+
needs: build
41+
runs-on: ubuntu-latest
42+
strategy:
43+
matrix:
44+
runtime: [osx-x64, osx-arm64]
45+
steps:
46+
- name: Checkout sources
47+
uses: actions/checkout@v4
48+
- name: Download build
49+
uses: actions/download-artifact@v4
50+
with:
51+
name: sourcegit.${{ matrix.runtime }}
52+
path: build/SourceGit
53+
- name: Package
54+
env:
55+
VERSION: ${{ inputs.version }}
56+
RUNTIME: ${{ matrix.runtime }}
57+
run: ./build/scripts/package.osx-app.sh
58+
- name: Upload package artifact
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: package.${{ matrix.runtime }}
62+
path: build/sourcegit_*.zip
63+
linux:
64+
name: Package Linux
65+
needs: build
66+
runs-on: ubuntu-latest
67+
strategy:
68+
matrix:
69+
runtime: [linux-x64, linux-arm64]
70+
steps:
71+
- name: Checkout sources
72+
uses: actions/checkout@v4
73+
- name: Download package dependencies
74+
run: |
75+
sudo add-apt-repository universe
76+
sudo apt-get update
77+
sudo apt-get install desktop-file-utils rpm libfuse2
78+
- name: Download build
79+
uses: actions/download-artifact@v4
80+
with:
81+
name: sourcegit.${{ matrix.runtime }}
82+
path: build
83+
- name: Package
84+
env:
85+
VERSION: ${{ inputs.version }}
86+
RUNTIME: ${{ matrix.runtime }}
87+
run: |
88+
mkdir build/SourceGit
89+
tar -xf "build/sourcegit.${{ matrix.runtime }}.tar" -C build/SourceGit
90+
./build/scripts/package.linux.sh
91+
- name: Upload package artifacts
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: package.${{ matrix.runtime }}
95+
path: |
96+
build/sourcegit-*.AppImage
97+
build/sourcegit_*.deb
98+
build/sourcegit-*.rpm

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
jobs:
7+
version:
8+
name: Prepare version string
9+
runs-on: ubuntu-latest
10+
outputs:
11+
version: ${{ steps.version.outputs.version }}
12+
steps:
13+
- name: Output version string
14+
id: version
15+
env:
16+
TAG: ${{ github.ref_name }}
17+
run: echo "version=${TAG#v}" >> "$GITHUB_OUTPUT"
18+
package:
19+
needs: version
20+
name: Package
21+
uses: ./.github/workflows/package.yml
22+
with:
23+
version: ${{ needs.version.outputs.version }}
24+
release:
25+
needs: [version, package]
26+
name: Release
27+
runs-on: ubuntu-latest
28+
permissions:
29+
contents: write
30+
steps:
31+
- name: Checkout sources
32+
uses: actions/checkout@v4
33+
- name: Create release
34+
env:
35+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
TAG: ${{ github.ref_name }}
37+
run: gh release create "$TAG" -t "Release ${TAG#v}" --notes-from-tag
38+
- name: Download artifacts
39+
uses: actions/download-artifact@v4
40+
with:
41+
pattern: package.*
42+
path: packages
43+
merge-multiple: true
44+
- name: Upload assets
45+
env:
46+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
TAG: ${{ github.ref_name }}
48+
VERSION: ${{ needs.version.outputs.version }}
49+
run: gh release upload "$TAG" packages/*

0 commit comments

Comments
 (0)