build(packaging): version number improvements (#4037)
This commit is contained in:
parent
5ef3f2ff5c
commit
2259141bd2
16 changed files with 104 additions and 69 deletions
12
.github/workflows/ci-flatpak.yml
vendored
12
.github/workflows/ci-flatpak.yml
vendored
|
|
@ -9,7 +9,7 @@ on:
|
|||
release_commit:
|
||||
required: true
|
||||
type: string
|
||||
release_tag:
|
||||
release_version:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
|
|
@ -104,6 +104,7 @@ jobs:
|
|||
run: |
|
||||
# variables for manifest
|
||||
branch="${{ github.head_ref }}"
|
||||
build_version=${{ inputs.release_version }}
|
||||
commit=${{ inputs.release_commit }}
|
||||
|
||||
# check the branch variable
|
||||
|
|
@ -111,7 +112,6 @@ jobs:
|
|||
then
|
||||
echo "This is a PUSH event"
|
||||
branch=${{ github.ref_name }}
|
||||
build_version=${{ inputs.release_tag }}
|
||||
clone_url=${{ github.event.repository.clone_url }}
|
||||
else
|
||||
echo "This is a PR event"
|
||||
|
|
@ -121,15 +121,17 @@ jobs:
|
|||
echo "Commit: ${commit}"
|
||||
echo "Clone URL: ${clone_url}"
|
||||
|
||||
export BRANCH=${branch}
|
||||
export BUILD_VERSION=${build_version}
|
||||
export CLONE_URL=${clone_url}
|
||||
export COMMIT=${commit}
|
||||
|
||||
mkdir -p build
|
||||
mkdir -p artifacts
|
||||
|
||||
cmake -DGITHUB_CLONE_URL=${clone_url} \
|
||||
-B build \
|
||||
-S . \
|
||||
-DBUILD_VERSION=${build_version} \
|
||||
-DGITHUB_BRANCH=${branch} \
|
||||
-DGITHUB_COMMIT=${commit} \
|
||||
-DSUNSHINE_CONFIGURE_FLATPAK_MAN=ON \
|
||||
-DSUNSHINE_CONFIGURE_ONLY=ON
|
||||
|
||||
|
|
|
|||
18
.github/workflows/ci-homebrew.yml
vendored
18
.github/workflows/ci-homebrew.yml
vendored
|
|
@ -76,13 +76,13 @@ jobs:
|
|||
run: |
|
||||
# variables for formula
|
||||
branch="${{ github.head_ref }}"
|
||||
build_version=${{ inputs.release_version }}
|
||||
commit=${{ inputs.release_commit }}
|
||||
|
||||
# check the branch variable
|
||||
if [ -z "$branch" ]
|
||||
then
|
||||
echo "This is a PUSH event"
|
||||
build_version=${{ inputs.release_tag }}
|
||||
clone_url=${{ github.event.repository.clone_url }}
|
||||
branch="${{ github.ref_name }}"
|
||||
default_branch="${{ github.event.repository.default_branch }}"
|
||||
|
|
@ -90,35 +90,31 @@ jobs:
|
|||
if [ "${{ matrix.release }}" == "true" ]; then
|
||||
# we will publish the formula with the release tag
|
||||
tag="${{ inputs.release_tag }}"
|
||||
version="${{ inputs.release_version }}"
|
||||
else
|
||||
tag="${{ github.ref_name }}"
|
||||
version="0.0.${{ github.run_number }}"
|
||||
fi
|
||||
else
|
||||
echo "This is a PR event"
|
||||
build_version="0.0.${{ github.event.number }}"
|
||||
clone_url=${{ github.event.pull_request.head.repo.clone_url }}
|
||||
branch="${{ github.event.pull_request.head.ref }}"
|
||||
default_branch="${{ github.event.pull_request.head.repo.default_branch }}"
|
||||
tag="${{ github.event.pull_request.head.ref }}"
|
||||
version="0.0.${{ github.event.number }}"
|
||||
fi
|
||||
echo "Branch: ${branch}"
|
||||
echo "Clone URL: ${clone_url}"
|
||||
echo "Tag: ${tag}"
|
||||
|
||||
export BRANCH=${branch}
|
||||
export BUILD_VERSION=${build_version}
|
||||
export CLONE_URL=${clone_url}
|
||||
export COMMIT=${commit}
|
||||
export TAG=${tag}
|
||||
|
||||
mkdir -p build
|
||||
cmake \
|
||||
-B build \
|
||||
-S . \
|
||||
-DBUILD_VERSION="${build_version}" \
|
||||
-DFORMULA_VERSION="${version}" \
|
||||
-DGITHUB_BRANCH="${branch}" \
|
||||
-DGITHUB_COMMIT="${commit}" \
|
||||
-DGITHUB_CLONE_URL="${clone_url}" \
|
||||
-DGITHUB_DEFAULT_BRANCH="${default_branch}" \
|
||||
-DGITHUB_TAG="${tag}" \
|
||||
-DSUNSHINE_CONFIGURE_HOMEBREW=ON \
|
||||
-DSUNSHINE_CONFIGURE_ONLY=ON
|
||||
|
||||
|
|
|
|||
6
.github/workflows/ci-linux.yml
vendored
6
.github/workflows/ci-linux.yml
vendored
|
|
@ -9,7 +9,7 @@ on:
|
|||
release_commit:
|
||||
required: true
|
||||
type: string
|
||||
release_tag:
|
||||
release_version:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ jobs:
|
|||
- name: Build Linux
|
||||
env:
|
||||
BRANCH: ${{ github.head_ref || github.ref_name }}
|
||||
BUILD_VERSION: ${{ inputs.release_tag }}
|
||||
BUILD_VERSION: ${{ inputs.release_version }}
|
||||
COMMIT: ${{ inputs.release_commit }}
|
||||
run: |
|
||||
chmod +x ./scripts/linux_build.sh
|
||||
|
|
@ -102,7 +102,7 @@ jobs:
|
|||
- name: Set AppImage Version
|
||||
if: matrix.name == 'AppImage'
|
||||
run: |
|
||||
version=${{ inputs.release_tag }}
|
||||
version=${{ inputs.release_version }}
|
||||
echo "VERSION=${version}" >> $GITHUB_ENV
|
||||
|
||||
- name: Package Linux - AppImage
|
||||
|
|
|
|||
4
.github/workflows/ci-windows.yml
vendored
4
.github/workflows/ci-windows.yml
vendored
|
|
@ -9,7 +9,7 @@ on:
|
|||
release_commit:
|
||||
required: true
|
||||
type: string
|
||||
release_tag:
|
||||
release_version:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
|
|
@ -257,7 +257,7 @@ jobs:
|
|||
shell: msys2 {0}
|
||||
env:
|
||||
BRANCH: ${{ github.head_ref || github.ref_name }}
|
||||
BUILD_VERSION: ${{ inputs.release_tag }}
|
||||
BUILD_VERSION: ${{ inputs.release_version }}
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
COMMIT: ${{ inputs.release_commit }}
|
||||
run: |
|
||||
|
|
|
|||
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
|
@ -59,6 +59,7 @@ jobs:
|
|||
publish_release: ${{ needs.release-setup.outputs.publish_release }}
|
||||
release_commit: ${{ needs.release-setup.outputs.release_commit }}
|
||||
release_tag: ${{ needs.release-setup.outputs.release_tag }}
|
||||
release_version: ${{ needs.release-setup.outputs.release_version }}
|
||||
secrets:
|
||||
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
|
|
@ -87,10 +88,11 @@ jobs:
|
|||
uses: ./.github/workflows/ci-linux.yml
|
||||
with:
|
||||
release_commit: ${{ needs.release-setup.outputs.release_commit }}
|
||||
release_tag: ${{ needs.release-setup.outputs.release_tag }}
|
||||
release_version: ${{ needs.release-setup.outputs.release_version }}
|
||||
|
||||
build-linux-copr:
|
||||
name: Linux Copr
|
||||
if: github.event_name != 'push' # releases are handled directly in ci-copr.yml
|
||||
needs: release-setup
|
||||
uses: ./.github/workflows/ci-copr.yml
|
||||
secrets:
|
||||
|
|
@ -104,7 +106,7 @@ jobs:
|
|||
uses: ./.github/workflows/ci-flatpak.yml
|
||||
with:
|
||||
release_commit: ${{ needs.release-setup.outputs.release_commit }}
|
||||
release_tag: ${{ needs.release-setup.outputs.release_tag }}
|
||||
release_version: ${{ needs.release-setup.outputs.release_version }}
|
||||
|
||||
build-windows:
|
||||
name: Windows
|
||||
|
|
@ -112,7 +114,7 @@ jobs:
|
|||
uses: ./.github/workflows/ci-windows.yml
|
||||
with:
|
||||
release_commit: ${{ needs.release-setup.outputs.release_commit }}
|
||||
release_tag: ${{ needs.release-setup.outputs.release_tag }}
|
||||
release_version: ${{ needs.release-setup.outputs.release_version }}
|
||||
secrets:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue