mirror of
https://github.com/AuxXxilium/synology-dsm-open-vm-tools.git
synced 2024-11-23 23:00:59 +07:00
build: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
23a1f4db51
commit
a9fcef1257
120
.github/workflows/build.yml
vendored
120
.github/workflows/build.yml
vendored
@ -3,17 +3,85 @@ name: build
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
tag:
|
version:
|
||||||
description: "tag"
|
description: "format %y.%-m.$i or auto"
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: [geminilake-7.1]
|
include:
|
||||||
|
- version: 7.1
|
||||||
|
platform: apollolake
|
||||||
|
parm: "4.4.180"
|
||||||
|
- version: 7.1
|
||||||
|
platform: broadwell
|
||||||
|
parm: "4.4.180"
|
||||||
|
- version: 7.1
|
||||||
|
platform: broadwellnk
|
||||||
|
parm: "4.4.180"
|
||||||
|
- version: 7.1
|
||||||
|
platform: broadwellnkv2
|
||||||
|
parm: "4.4.180"
|
||||||
|
- version: 7.1
|
||||||
|
platform: denverton
|
||||||
|
parm: "4.4.180"
|
||||||
|
- version: 7.1
|
||||||
|
platform: epyc7002
|
||||||
|
parm: "5.10.55"
|
||||||
|
- version: 7.1
|
||||||
|
platform: geminilake
|
||||||
|
parm: "4.4.180"
|
||||||
|
- version: 7.1
|
||||||
|
platform: purley
|
||||||
|
parm: "4.4.180"
|
||||||
|
- version: 7.1
|
||||||
|
platform: r1000
|
||||||
|
parm: "4.4.180"
|
||||||
|
- version: 7.1
|
||||||
|
platform: v1000
|
||||||
|
parm: "4.4.180"
|
||||||
|
#- version: 7.1
|
||||||
|
# platform: kvmx64
|
||||||
|
# parm: "4.4.180"
|
||||||
|
|
||||||
|
- version: 7.2
|
||||||
|
platform: apollolake
|
||||||
|
parm: "4.4.302"
|
||||||
|
- version: 7.2
|
||||||
|
platform: broadwell
|
||||||
|
parm: "4.4.302"
|
||||||
|
- version: 7.2
|
||||||
|
platform: broadwellnk
|
||||||
|
parm: "4.4.302"
|
||||||
|
- version: 7.2
|
||||||
|
platform: broadwellnkv2
|
||||||
|
parm: "4.4.302"
|
||||||
|
- version: 7.2
|
||||||
|
platform: denverton
|
||||||
|
parm: "4.4.302"
|
||||||
|
- version: 7.2
|
||||||
|
platform: epyc7002
|
||||||
|
parm: "5.10.55"
|
||||||
|
- version: 7.2
|
||||||
|
platform: geminilake
|
||||||
|
parm: "4.4.302"
|
||||||
|
- version: 7.2
|
||||||
|
platform: purley
|
||||||
|
parm: "4.4.302"
|
||||||
|
- version: 7.2
|
||||||
|
platform: r1000
|
||||||
|
parm: "4.4.302"
|
||||||
|
- version: 7.2
|
||||||
|
platform: v1000
|
||||||
|
parm: "4.4.302"
|
||||||
|
#- version: 7.2
|
||||||
|
# platform: kvmx64
|
||||||
|
# parm: "4.4.302"
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -21,9 +89,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Init Env
|
- name: Init Env
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
git config --global user.email "info@auxxxilium.tech"
|
||||||
git config --global user.name "github-actions[bot]"
|
git config --global user.name "AuxXxilium"
|
||||||
sudo timedatectl set-timezone "Asia/Shanghai"
|
sudo timedatectl set-timezone "Europe/Berlin"
|
||||||
|
|
||||||
- name: Checkout Synology Community Source and Docker Image
|
- name: Checkout Synology Community Source and Docker Image
|
||||||
run: |
|
run: |
|
||||||
@ -36,21 +104,45 @@ jobs:
|
|||||||
- name: Build Package
|
- name: Build Package
|
||||||
run: |
|
run: |
|
||||||
ROOT_PATH="${{ github.workspace }}"
|
ROOT_PATH="${{ github.workspace }}"
|
||||||
MAKE_ARCH="arch-${{ matrix.target }}"
|
MAKE_ARCH="arch-${{ matrix.platform }}-${{ matrix.version }}"
|
||||||
docker run -v ${ROOT_PATH}/spksrc:/spksrc -w /spksrc/spk/open-vm-tools ghcr.io/synocommunity/spksrc make ${MAKE_ARCH}
|
docker run -v ${ROOT_PATH}/spksrc:/spksrc -w /spksrc/spk/open-vm-tools ghcr.io/synocommunity/spksrc make ${MAKE_ARCH}
|
||||||
|
|
||||||
|
- name: Calculate Version
|
||||||
|
run: |
|
||||||
|
# Calculate Version
|
||||||
|
VERSION=""
|
||||||
|
if [ -n "${{ inputs.version }}" ]; then
|
||||||
|
VERSION="${{ inputs.version }}"
|
||||||
|
else
|
||||||
|
LATEST_TAG="`curl -skL "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r ".tag_name" 2>/dev/null`"
|
||||||
|
if [[ -n "${LATEST_TAG}" && "`echo ${LATEST_TAG} | cut -d '.' -f 1,2`" = "`date +'%y.%-m.%-d'`" ]]; then # format %y.%-m.$i
|
||||||
|
VERSION="`echo ${LATEST_TAG} | awk -F '.' '{$3=$3+1}1' OFS='.'`"
|
||||||
|
else
|
||||||
|
VERSION="`date +'%y.%-m.%-d'`"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${VERSION}" ]; then
|
||||||
|
# Modify Source File
|
||||||
|
echo "Version: ${VERSION}"
|
||||||
|
echo "${VERSION}" >VERSION
|
||||||
|
echo "${VERSION}" >"./output/VERSION"
|
||||||
|
echo "VERSION=${VERSION}" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Upload to Artifacts
|
- name: Upload to Artifacts
|
||||||
if: inputs.tag == ''
|
if: success() && env.VERSION == ''
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.target }}
|
name: ${{ matrix.platform }}-${{ matrix.version }}
|
||||||
path: |
|
path: |
|
||||||
spksrc/packages/*.spk
|
spksrc/packages/*.spk
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
if: inputs.tag != ''
|
if: success() && env.VERSION != ''
|
||||||
uses: softprops/action-gh-release@v2
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ inputs.tag }}
|
tag: ${{ env.VERSION }}
|
||||||
files: spksrc/packages/*.spk
|
allowUpdates: true
|
||||||
|
artifacts: spksrc/packages/*.spk
|
||||||
|
Loading…
Reference in New Issue
Block a user