diff options
| author | Dan Engelbrecht <[email protected]> | 2022-06-13 12:44:30 +0200 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-06-13 12:44:30 +0200 |
| commit | 802e3b28a89f41372ab9b2861e310b12d248fa07 (patch) | |
| tree | d1a07041ba4dd5c6bb3cba461290024c132e4ba5 | |
| parent | Merge branch 'main' of https://github.com/EpicGames/zen (diff) | |
| download | zen-802e3b28a89f41372ab9b2861e310b12d248fa07.tar.xz zen-802e3b28a89f41372ab9b2861e310b12d248fa07.zip | |
automate bump version
| -rw-r--r-- | .github/workflows/create_release.yml | 27 | ||||
| -rw-r--r-- | .github/workflows/validate.yml | 3 | ||||
| -rw-r--r-- | version.txt | 1 |
3 files changed, 28 insertions, 3 deletions
diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 76cc863a4..2a4f3aee2 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -7,10 +7,31 @@ on: - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 jobs: - bundle-windows: + bump-version-tag: + runs-on: [self-hosted, linux, x64] - runs-on: [self-hosted, windows, x64] + steps: + - uses: actions/checkout@v2 + - name: Check prerelease + id: get-prerelease + uses: haya14busa/action-cond@v1 + with: + cond: ${{contains(github.ref, '-pre')}} + if_true: "true" + if_false: "false" + + - name: Update Version + if: ! ${{steps.get-prerelease.outputs.value}} + run: | + echo ${{ github.ref_name }} > version.txt + sed -i 's/##$/##\n\n## ${{ github.ref_name }}/' CHANGELOG.md + git add CHANGELOG.md version.txt + echo git commit -m"Bump version to ${{ github.ref_name }}" + echo git push + + bundle-windows: + runs-on: [self-hosted, windows, x64] env: VCPKG_VERSION: 2022.03.10 ZEN_VERSION: ${{github.ref.name}} @@ -53,7 +74,6 @@ jobs: bundle-linux: runs-on: [self-hosted, linux, x64] - env: VCPKG_VERSION: 2022.03.10 @@ -101,6 +121,7 @@ jobs: create-release: runs-on: [self-hosted, linux, x64] needs: [bundle-linux, bundle-windows] + steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 3988a9dfb..569ffad36 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -6,6 +6,9 @@ on: branches: [ main ] 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..e3ff92d1e --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +v0.1.4-pre0 |