mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
Rename artifacts to match the releases
This commit is contained in:
82
.github/workflows/ci.yml
vendored
82
.github/workflows/ci.yml
vendored
@@ -31,6 +31,20 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
get_artifact_name:
|
||||||
|
name: Get version info
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
name: ${{ steps.ghd.outputs.describe }}
|
||||||
|
short-sha: ${{ steps.ghd.outputs.short-sha }}
|
||||||
|
distance: ${{ steps.ghd.outputs.distance }}
|
||||||
|
tag: ${{ steps.ghd.outputs.tag }}
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Git describe
|
||||||
|
id: ghd
|
||||||
|
uses: proudust/gh-describe@v2
|
||||||
lint-commit:
|
lint-commit:
|
||||||
name: Lint Commit Message
|
name: Lint Commit Message
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
@@ -72,6 +86,7 @@ jobs:
|
|||||||
g2dat:
|
g2dat:
|
||||||
name: g2.dat
|
name: g2.dat
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: get_artifact_name
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout OpenRCT2
|
- name: Checkout OpenRCT2
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -89,12 +104,12 @@ jobs:
|
|||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: g2.dat
|
name: g2-${{ needs.get_artifact_name.outputs.name }}.dat
|
||||||
path: g2.dat
|
path: g2.dat
|
||||||
windows:
|
windows:
|
||||||
name: Windows
|
name: Windows
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: check-code-formatting
|
needs: [check-code-formatting, get_artifact_name]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -112,11 +127,6 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Git describe for shallow checkout
|
|
||||||
id: ghd
|
|
||||||
uses: proudust/gh-describe@v2
|
|
||||||
- name: Update GA environment
|
|
||||||
run: echo "OPENRCT2_DESCRIBE=${{ steps.ghd.outputs.describe }}" >> $GITHUB_ENV
|
|
||||||
- name: Install MSVC problem matcher
|
- name: Install MSVC problem matcher
|
||||||
uses: ammaraskar/msvc-problem-matcher@master
|
uses: ammaraskar/msvc-problem-matcher@master
|
||||||
- name: Build OpenRCT2
|
- name: Build OpenRCT2
|
||||||
@@ -127,10 +137,15 @@ jobs:
|
|||||||
build-portable
|
build-portable
|
||||||
build-symbols
|
build-symbols
|
||||||
build-installer -i
|
build-installer -i
|
||||||
|
- name: Rename artifacts
|
||||||
|
run: |
|
||||||
|
mv artifacts/openrct2-portable-*.zip artifacts/OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-windows-portable-$PLATFORM.zip
|
||||||
|
mv artifacts/openrct2-installer-*.exe artifacts/OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-windows-installer-$PLATFORM.exe
|
||||||
|
mv artifacts/openrct2-symbols-*.zip artifacts/OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-windows-symbols-$PLATFORM.zip
|
||||||
- name: Upload artifacts (CI)
|
- name: Upload artifacts (CI)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: OpenRCT2-${{ runner.os }}-${{ matrix.platform }}
|
name: OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-${{ runner.os }}-${{ matrix.platform }}
|
||||||
path: artifacts
|
path: artifacts
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
@@ -145,9 +160,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
. scripts/setenv
|
. scripts/setenv
|
||||||
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
|
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
|
||||||
upload-build artifacts/openrct2-portable-*.zip "windows-portable-$PLATFORM.zip" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
upload-build artifacts/OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-windows-portable-$PLATFORM.zip "windows-portable-$PLATFORM.zip" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
||||||
upload-build artifacts/openrct2-installer-*.exe "windows-installer-$PLATFORM.exe" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
upload-build artifacts/OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-windows-installer-$PLATFORM.exe "windows-installer-$PLATFORM.exe" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
||||||
upload-build artifacts/openrct2-symbols-*.zip "windows-symbols-$PLATFORM.zip" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
upload-build artifacts/OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-windows-symbols-$PLATFORM.zip "windows-symbols-$PLATFORM.zip" $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
||||||
upload-backtrace-symbols artifacts/openrct2-symbols-*.zip
|
upload-backtrace-symbols artifacts/openrct2-symbols-*.zip
|
||||||
else
|
else
|
||||||
echo 'Not going to push build'
|
echo 'Not going to push build'
|
||||||
@@ -155,7 +170,7 @@ jobs:
|
|||||||
windows-mingw:
|
windows-mingw:
|
||||||
name: Windows (${{ matrix.platform_name }}) using mingw
|
name: Windows (${{ matrix.platform_name }}) using mingw
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: check-code-formatting
|
needs: [check-code-formatting, get_artifact_name]
|
||||||
container: openrct2/openrct2-build:14-mingw
|
container: openrct2/openrct2-build:14-mingw
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -185,7 +200,7 @@ jobs:
|
|||||||
if: matrix.platform == 'NT5.1'
|
if: matrix.platform == 'NT5.1'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: OpenRCT2-Windows-${{ matrix.platform }}
|
name: OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-Windows-mingw-${{ matrix.platform }}
|
||||||
path: bin/openrct2.exe
|
path: bin/openrct2.exe
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
macos-cmake:
|
macos-cmake:
|
||||||
@@ -251,7 +266,7 @@ jobs:
|
|||||||
macos-universal:
|
macos-universal:
|
||||||
name: macOS universal app bundle
|
name: macOS universal app bundle
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
needs: macos-cmake
|
needs: [macos-cmake, get_artifact_name]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -279,25 +294,25 @@ jobs:
|
|||||||
mv macos_universal/OpenRCT2-universal.app artifacts/OpenRCT2.app
|
mv macos_universal/OpenRCT2-universal.app artifacts/OpenRCT2.app
|
||||||
echo -e "\033[0;36mCompressing OpenRCT2.app...\033[0m"
|
echo -e "\033[0;36mCompressing OpenRCT2.app...\033[0m"
|
||||||
cd artifacts
|
cd artifacts
|
||||||
zip -rqy openrct2-macos.zip OpenRCT2.app
|
zip -rqy OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-macos-universal.zip OpenRCT2.app
|
||||||
- name: Upload artifacts (CI)
|
- name: Upload artifacts (CI)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: OpenRCT2-${{ runner.os }}-universal
|
name: OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-${{ runner.os }}-universal
|
||||||
path: artifacts/openrct2-macos.zip
|
path: artifacts/OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-macos-universal.zip
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Upload artifacts (openrct2.org)
|
- name: Upload artifacts (openrct2.org)
|
||||||
run: |
|
run: |
|
||||||
. scripts/setenv
|
. scripts/setenv
|
||||||
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
|
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
|
||||||
upload-build artifacts/openrct2-macos.zip macos-universal.zip $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
upload-build artifacts/OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-macos-universal.zip macos-universal.zip $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
||||||
else
|
else
|
||||||
echo 'Not going to push build'
|
echo 'Not going to push build'
|
||||||
fi
|
fi
|
||||||
linux-portable:
|
linux-portable:
|
||||||
name: ${{ matrix.distro }} Linux (${{ matrix.release }}, ${{ matrix.platform }}, portable)
|
name: ${{ matrix.distro }} Linux (${{ matrix.release }}, ${{ matrix.platform }}, portable)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: check-code-formatting
|
needs: [check-code-formatting, get_artifact_name]
|
||||||
container: ${{ matrix.image }}
|
container: ${{ matrix.image }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -328,29 +343,28 @@ jobs:
|
|||||||
- name: Build OpenRCT2
|
- name: Build OpenRCT2
|
||||||
run: . scripts/setenv -q && build -DWITH_TESTS=on -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DPORTABLE=ON ${{ matrix.build_flags }}
|
run: . scripts/setenv -q && build -DWITH_TESTS=on -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DPORTABLE=ON ${{ matrix.build_flags }}
|
||||||
- name: Build artifacts
|
- name: Build artifacts
|
||||||
run: . scripts/setenv -q && build-portable artifacts/OpenRCT2-${{ runner.os }}-${{ matrix.distro }}-${{ matrix.platform }}.tar.gz bin/install/usr
|
run: . scripts/setenv -q && build-portable artifacts/OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-${{ runner.os }}-${{ matrix.release }}-${{ matrix.platform }}.tar.gz bin/install/usr
|
||||||
- name: Upload artifacts (CI)
|
- name: Upload artifacts (CI)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: OpenRCT2-${{ runner.os }}-${{ matrix.distro }}-${{ matrix.platform }}
|
name: OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-${{ runner.os }}-${{ matrix.release }}-${{ matrix.platform }}
|
||||||
path: artifacts
|
path: artifacts
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: . scripts/setenv -q && run-tests
|
run: . scripts/setenv -q && run-tests
|
||||||
|
|
||||||
- name: Upload artifacts (openrct2.org)
|
- name: Upload artifacts (openrct2.org)
|
||||||
run: |
|
run: |
|
||||||
# Build identification code: https://github.com/Limetric/OpenRCT2.org/blob/e5b738f3dadcc5a3b78e8dfd434756ff31eaa1d3/src/misc/releaseAsset.js#L94-L116
|
# Build identification code: https://github.com/Limetric/OpenRCT2.org/blob/e5b738f3dadcc5a3b78e8dfd434756ff31eaa1d3/src/misc/releaseAsset.js#L94-L116
|
||||||
. scripts/setenv -q
|
. scripts/setenv -q
|
||||||
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
|
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
|
||||||
upload-build artifacts/OpenRCT2-${{ runner.os }}-${{ matrix.distro }}-${{ matrix.platform }}.tar.gz linux-${{ matrix.platform }}-${{ matrix.distro }}.tar.gz $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
upload-build artifacts/OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-${{ runner.os }}-${{ matrix.release }}-${{ matrix.platform }}.tar.gz linux-${{ matrix.platform }}-${{ matrix.distro }}.tar.gz $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
||||||
else
|
else
|
||||||
echo 'Not going to push build'
|
echo 'Not going to push build'
|
||||||
fi
|
fi
|
||||||
linux-appimage:
|
linux-appimage:
|
||||||
name: Ubuntu Linux (AppImage, x86_64)
|
name: Ubuntu Linux (AppImage, x86_64)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: check-code-formatting
|
needs: [check-code-formatting, get_artifact_name]
|
||||||
container: openrct2/openrct2-build:16-noble
|
container: openrct2/openrct2-build:16-noble
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -364,11 +378,13 @@ jobs:
|
|||||||
- name: Build OpenRCT2
|
- name: Build OpenRCT2
|
||||||
run: . scripts/setenv -q && build -DCMAKE_BUILD_TYPE=Release -DAPPIMAGE=ON -DOPENRCT2_USE_CCACHE=on
|
run: . scripts/setenv -q && build -DCMAKE_BUILD_TYPE=Release -DAPPIMAGE=ON -DOPENRCT2_USE_CCACHE=on
|
||||||
- name: Build AppImage
|
- name: Build AppImage
|
||||||
|
env:
|
||||||
|
APPIMAGE_FILE_NAME: OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-linux-x86_64.AppImage
|
||||||
run: . scripts/setenv -q && build-appimage
|
run: . scripts/setenv -q && build-appimage
|
||||||
- name: Upload artifacts (CI)
|
- name: Upload artifacts (CI)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: OpenRCT2-AppImage
|
name: OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-AppImage
|
||||||
path: artifacts
|
path: artifacts
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Upload artifacts (openrct2.org)
|
- name: Upload artifacts (openrct2.org)
|
||||||
@@ -376,7 +392,7 @@ jobs:
|
|||||||
# Build identification code: https://github.com/Limetric/OpenRCT2.org/blob/e5b738f3dadcc5a3b78e8dfd434756ff31eaa1d3/src/misc/releaseAsset.js#L94-L116
|
# Build identification code: https://github.com/Limetric/OpenRCT2.org/blob/e5b738f3dadcc5a3b78e8dfd434756ff31eaa1d3/src/misc/releaseAsset.js#L94-L116
|
||||||
. scripts/setenv -q
|
. scripts/setenv -q
|
||||||
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
|
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
|
||||||
upload-build artifacts/OpenRCT2-x86_64.AppImage linux.AppImage $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
upload-build artifacts/OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-linux-x86_64.AppImage linux.AppImage $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
||||||
else
|
else
|
||||||
echo 'Not going to push build'
|
echo 'Not going to push build'
|
||||||
fi
|
fi
|
||||||
@@ -424,7 +440,7 @@ jobs:
|
|||||||
linux-clang-tests:
|
linux-clang-tests:
|
||||||
name: Ubuntu Linux (debug) using clang, coverage enabled
|
name: Ubuntu Linux (debug) using clang, coverage enabled
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: check-code-formatting
|
needs: [check-code-formatting, get_artifact_name]
|
||||||
container: openrct2/openrct2-build:16-noble
|
container: openrct2/openrct2-build:16-noble
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -456,7 +472,7 @@ jobs:
|
|||||||
- name: Upload artifacts (CI)
|
- name: Upload artifacts (CI)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: OpenRCT2-${{ runner.os }}-coverage
|
name: OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-${{ runner.os }}-coverage
|
||||||
path: |
|
path: |
|
||||||
bin/*profdata*
|
bin/*profdata*
|
||||||
bin/coverage.json*
|
bin/coverage.json*
|
||||||
@@ -465,7 +481,7 @@ jobs:
|
|||||||
android:
|
android:
|
||||||
name: Android
|
name: Android
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: check-code-formatting
|
needs: [check-code-formatting, get_artifact_name]
|
||||||
container: openrct2/openrct2-build:14-android
|
container: openrct2/openrct2-build:14-android
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -480,21 +496,21 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
. scripts/setenv
|
. scripts/setenv
|
||||||
pushd src/openrct2-android
|
pushd src/openrct2-android
|
||||||
./gradlew app:assembleRelease
|
./gradlew app:assembleRelease
|
||||||
popd
|
popd
|
||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
mv src/openrct2-android/app/build/outputs/apk/release/app-release.apk artifacts/openrct2-arm.apk
|
mv src/openrct2-android/app/build/outputs/apk/release/app-release.apk artifacts/OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-android-arm.apk
|
||||||
- name: Upload artifacts (CI)
|
- name: Upload artifacts (CI)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: OpenRCT2-Android
|
name: OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-Android
|
||||||
path: artifacts
|
path: artifacts
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Upload artifacts (openrct2.org)
|
- name: Upload artifacts (openrct2.org)
|
||||||
run: |
|
run: |
|
||||||
. scripts/setenv -q
|
. scripts/setenv -q
|
||||||
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
|
if [[ "$OPENRCT2_PUSH" == "true" ]]; then
|
||||||
upload-build artifacts/openrct2-arm.apk android-arm.apk $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
upload-build artifacts/OpenRCT2-${{ needs.get_artifact_name.outputs.name }}-android-arm.apk android-arm.apk $OPENRCT2_VERSION $OPENRCT2_SHA1 $OPENRCT2_BRANCH
|
||||||
else
|
else
|
||||||
echo 'Not going to push build'
|
echo 'Not going to push build'
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -15,5 +15,9 @@ pushd bin
|
|||||||
$linuxdeploy --appimage-extract-and-run --appdir install/ --output appimage --desktop-file install/usr/share/applications/openrct2.desktop
|
$linuxdeploy --appimage-extract-and-run --appdir install/ --output appimage --desktop-file install/usr/share/applications/openrct2.desktop
|
||||||
popd
|
popd
|
||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
mv bin/OpenRCT2*.AppImage artifacts
|
# If APPIMAGE_FILE_NAME is set, use it as the filename, otherwise use the default
|
||||||
|
if [ -z "$APPIMAGE_FILE_NAME" ]; then
|
||||||
|
APPIMAGE_FILE_NAME=OpenRCT2-$OPENRCT2_VERSION-linux-x86_64.AppImage
|
||||||
|
fi
|
||||||
|
mv bin/OpenRCT2-x86_64.AppImage artifacts/$APPIMAGE_FILE_NAME
|
||||||
rm $linuxdeploy
|
rm $linuxdeploy
|
||||||
|
|||||||
Reference in New Issue
Block a user