diff options
| author | Dan Engelbrecht <[email protected]> | 2022-06-15 09:41:23 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-06-15 09:41:23 -0700 |
| commit | 4339eb8ad7b6c2e1ba5919872bc1065f762a2ec3 (patch) | |
| tree | 2670618bd720387f63dc03175b083feaab6935d1 | |
| parent | Merge pull request #129 from EpicGames/de/better-iterate-chunks (diff) | |
| parent | cleanup (diff) | |
| download | zen-4339eb8ad7b6c2e1ba5919872bc1065f762a2ec3.tar.xz zen-4339eb8ad7b6c2e1ba5919872bc1065f762a2ec3.zip | |
Merge pull request #131 from EpicGames/de/version-tag-automation
De/version tag automation
| -rw-r--r-- | .github/workflows/create_release.yml | 20 | ||||
| -rw-r--r-- | .github/workflows/validate.yml | 6 | ||||
| -rw-r--r-- | VERSION.txt | 1 | ||||
| -rw-r--r-- | xmake.lua | 3 | ||||
| -rw-r--r-- | zencore/xmake.lua | 4 |
5 files changed, 21 insertions, 13 deletions
diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 76cc863a4..0d6baa193 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -2,18 +2,14 @@ name: Create Release on: push: - # Sequence of patterns matched against refs/tags - tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + paths: + - 'VERSION.txt' jobs: bundle-windows: - runs-on: [self-hosted, windows, x64] - env: VCPKG_VERSION: 2022.03.10 - ZEN_VERSION: ${{github.ref.name}} steps: - uses: actions/checkout@v2 @@ -43,7 +39,6 @@ jobs: xmake bundle -v -y env: VCPKG_ROOT: ${{ github.workspace }}/.vcpkg - ZEN_VERSION: ${{ github.ref_name }} - name: Upload zenserver-win64 uses: actions/upload-artifact@v3 @@ -53,7 +48,6 @@ jobs: bundle-linux: runs-on: [self-hosted, linux, x64] - env: VCPKG_VERSION: 2022.03.10 @@ -90,7 +84,6 @@ jobs: xmake bundle -v -y env: VCPKG_ROOT: ${{ github.workspace }}/.vcpkg - ZEN_VERSION: ${{ github.ref_name }} - name: Upload zenserver-linux uses: actions/upload-artifact@v3 @@ -101,6 +94,7 @@ jobs: create-release: runs-on: [self-hosted, linux, x64] needs: [bundle-linux, bundle-windows] + steps: - uses: actions/checkout@v2 @@ -134,13 +128,19 @@ jobs: with: path: "CHANGELOG.tmp" + - name: Read VERSION.txt + id: read_version + uses: andstor/file-reader-action@v1 + with: + path: "VERSION.txt" + - name: Create Release id: create_release uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{github.ref.name}} + tag_name: v${{steps.read_version.outputs.contents}} body: | ${{steps.read_changelog.outputs.contents}} draft: false diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 3988a9dfb..7ceec353b 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -4,8 +4,14 @@ on: pull_request: types: [opened, reopened, synchronize] branches: [ main ] + paths-ignore: + - 'VERSION.txt' + - 'CHANGELOG.md' push: branches: [ main ] + paths-ignore: + - 'VERSION.txt' + - 'CHANGELOG.md' jobs: cancel-old-build: diff --git a/VERSION.txt b/VERSION.txt new file mode 100644 index 000000000..0da163cd7 --- /dev/null +++ b/VERSION.txt @@ -0,0 +1 @@ +0.1.4-pre2 @@ -1,9 +1,6 @@ -- Copyright Epic Games, Inc. All Rights Reserved. set_configvar("ZEN_SCHEMA_VERSION", 3) -- changed cas oplog format (p3rl) -local zenversion = os.getenv("ZEN_VERSION") or "0.0.0" -zenversion = string.gsub(zenversion, "^v", "") -set_version(zenversion, { build = "%Y%m%d%H%M" }) add_requires( "vcpkg::asio", diff --git a/zencore/xmake.lua b/zencore/xmake.lua index 63e874ac5..3f78be99c 100644 --- a/zencore/xmake.lua +++ b/zencore/xmake.lua @@ -4,6 +4,10 @@ target('zencore') set_kind("static") add_headerfiles("**.h") add_configfiles("include/zencore/config.h.in") + on_load(function (target) + local version = io.readfile("VERSION.txt") + target:set("version", version:trim(), {build = "%Y%m%d%H%M"}) + end) set_configdir("include/zencore") add_files("**.cpp") add_includedirs("include", {public=true}) |