diff options
| -rw-r--r-- | .github/workflows/create_release.yml | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 2a4f3aee2..0f075a233 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -2,39 +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: - bump-version-tag: - runs-on: [self-hosted, linux, 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}} steps: - uses: actions/checkout@v2 @@ -64,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 @@ -110,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 @@ -155,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 |