idle-survivors/.woodpecker.yml

81 lines
2.6 KiB
YAML
Raw Permalink Normal View History

2023-07-16 23:29:28 -05:00
workspace:
base: /studio
path: idle-survivors
# We use a singleton "matrix" to set variables, because formal variables are a
# Woodpecker next feature.
matrix:
2023-07-16 23:36:29 -05:00
include:
- BUILD_NAME: idle-survivors
UNITY_ACTIVATION_FILE: ./unity3d.alf
IMAGE: unityci/editor
IMAGE_VERSION: 1
2023-07-16 23:49:06 -05:00
# The GitLab version pulls the Unity version from the project information,
# but I don't think Woodpecker will use that as a variable in image names.
# We set the version as a variable instead and check that it's right.
2023-07-16 23:36:29 -05:00
UNITY_VERSION: 2022.3.4f1
UNITY_DIR: /studio/idle-survivors
2023-07-16 23:29:28 -05:00
pipeline:
check-unity-version:
image: ${IMAGE}:${UNITY_VERSION}-base-${IMAGE_VERSION}
commands:
- test "$UNITY_VERSION" = $(grep "m_EditorVersion:" "${UNITY_DIR}/ProjectSettings/ProjectVersion.txt" | cut -d' ' -f2)
setup-license:
image: ${IMAGE}:${UNITY_VERSION}-base-${IMAGE_VERSION}
commands:
- chmod +x ${UNITY_DIR}/ci/before_script.sh
- ${UNITY_DIR}/ci/before_script.sh
secrets: [unity_license]
# test-playmode:
# image: ${IMAGE}:${UNITY_VERSION}-base-${IMAGE_VERSION}
# group: test
# commands:
# - chmod +x ${UNITY_DIR}/ci/test.sh
# - ${UNITY_DIR}/ci/test.sh
# environment:
# - TEST_PLATFORM=playmode
# - TESTING_TYPE=NUNIT
# - VERSION_NUMBER_VAR=${CI_COMMIT_BRANCH}-${CI_BUILD_NUMBER}
# - VERSION_BUILD_VAR=${CI_COMMIT_HASH}
# test-editmode:
# image: ${IMAGE}:${UNITY_VERSION}-base-${IMAGE_VERSION}
# group: test
# commands:
# - chmod +x ${UNITY_DIR}/ci/test.sh
# - ${UNITY_DIR}/ci/test.sh
# environment:
# - TEST_PLATFORM=editmode
# - TESTING_TYPE=NUNIT
# - VERSION_NUMBER_VAR=${CI_COMMIT_BRANCH}-${CI_BUILD_NUMBER}
# - VERSION_BUILD_VAR=${CI_COMMIT_HASH}
2023-07-16 23:29:28 -05:00
build-standalone-windows:
image: ${IMAGE}:${UNITY_VERSION}-windows-mono-${IMAGE_VERSION}
group: build
commands:
- chmod +x ./ci/build.sh
- ./ci/build.sh
environment:
- BUILD_TARGET=StandaloneWindows64
2023-07-16 23:49:06 -05:00
- VERSION_NUMBER_VAR=${CI_COMMIT_TAG}
- VERSION_BUILD_VAR=${CI_COMMIT_HASH}
when:
event: tag
2023-07-16 23:29:28 -05:00
package:
image: ${IMAGE}:${UNITY_VERSION}-windows-mono-${IMAGE_VERSION}
commands:
2023-07-16 23:49:06 -05:00
- tar -C ${UNITY_DIR}/Builds -cvzf ${CI_COMMIT_TAG}.tar.gz .
2023-07-16 23:29:28 -05:00
when:
event: tag
publish:
image: woodpeckerci/plugin-gitea-release
settings:
api-key:
from_secret: gitea_api_key
files:
2023-07-16 23:49:06 -05:00
- ${CI_COMMIT_TAG}.tar.gz
2023-07-16 23:29:28 -05:00
target: main
base_url: https://git.sunturtle.xyz
when:
event: tag