mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 11:44:59 +00:00
ci: enhance Linux and Windows package workflow (#1071)
* ci: fix Linux packaging workflow with specific Ubuntu 20.04 image * ci: use Compress-Archive in Windows try to prevent Defender false positives
This commit is contained in:
parent
978801c9ff
commit
6ba26770c4
2 changed files with 14 additions and 6 deletions
14
.github/workflows/package.yml
vendored
14
.github/workflows/package.yml
vendored
|
@ -9,10 +9,10 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
windows:
|
windows:
|
||||||
name: Package Windows
|
name: Package Windows
|
||||||
runs-on: ubuntu-latest
|
runs-on: windows-2019
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
runtime: [win-x64, win-arm64]
|
runtime: [ win-x64, win-arm64 ]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -22,6 +22,7 @@ jobs:
|
||||||
name: sourcegit.${{ matrix.runtime }}
|
name: sourcegit.${{ matrix.runtime }}
|
||||||
path: build/SourceGit
|
path: build/SourceGit
|
||||||
- name: Package
|
- name: Package
|
||||||
|
shell: bash
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ inputs.version }}
|
VERSION: ${{ inputs.version }}
|
||||||
RUNTIME: ${{ matrix.runtime }}
|
RUNTIME: ${{ matrix.runtime }}
|
||||||
|
@ -69,6 +70,7 @@ jobs:
|
||||||
linux:
|
linux:
|
||||||
name: Package Linux
|
name: Package Linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container: ubuntu:20.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
runtime: [linux-x64, linux-arm64]
|
runtime: [linux-x64, linux-arm64]
|
||||||
|
@ -77,9 +79,10 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Download package dependencies
|
- name: Download package dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo add-apt-repository universe
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
sudo apt-get update
|
ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime
|
||||||
sudo apt-get install desktop-file-utils rpm libfuse2
|
apt-get update
|
||||||
|
apt-get install -y curl wget git dpkg-dev fakeroot tzdata zip unzip desktop-file-utils rpm libfuse2 file build-essential binutils
|
||||||
- name: Download build
|
- name: Download build
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
@ -89,6 +92,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ inputs.version }}
|
VERSION: ${{ inputs.version }}
|
||||||
RUNTIME: ${{ matrix.runtime }}
|
RUNTIME: ${{ matrix.runtime }}
|
||||||
|
APPIMAGE_EXTRACT_AND_RUN: 1
|
||||||
run: |
|
run: |
|
||||||
mkdir build/SourceGit
|
mkdir build/SourceGit
|
||||||
tar -xf "build/sourcegit.${{ matrix.runtime }}.tar" -C build/SourceGit
|
tar -xf "build/sourcegit.${{ matrix.runtime }}.tar" -C build/SourceGit
|
||||||
|
|
|
@ -9,4 +9,8 @@ cd build
|
||||||
|
|
||||||
rm -rf SourceGit/*.pdb
|
rm -rf SourceGit/*.pdb
|
||||||
|
|
||||||
zip "sourcegit_$VERSION.$RUNTIME.zip" -r SourceGit
|
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OSTYPE" == "win32" ]]; then
|
||||||
|
powershell -Command "Compress-Archive -Path SourceGit\\* -DestinationPath \"sourcegit_$VERSION.$RUNTIME.zip\" -Force"
|
||||||
|
else
|
||||||
|
zip "sourcegit_$VERSION.$RUNTIME.zip" -r SourceGit
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue