aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-05-23 23:55:23 +0200
committerDan Engelbrecht <[email protected]>2022-06-02 00:35:50 +0200
commitfec1425199731ede0d66ecc05616c5fd7c4385a9 (patch)
tree9654757dc36a6c9178e619ee3bd29b9f0ae7053b /.github/workflows
parentcreate_release.yml (diff)
downloadzen-fec1425199731ede0d66ecc05616c5fd7c4385a9.tar.xz
zen-fec1425199731ede0d66ecc05616c5fd7c4385a9.zip
fix 7zip and create release reading from CHANGELOG.md
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/create_release.yml77
1 files changed, 51 insertions, 26 deletions
diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml
index 9951164c2..eca84289f 100644
--- a/.github/workflows/create_release.yml
+++ b/.github/workflows/create_release.yml
@@ -7,17 +7,10 @@ on:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
- windows-bundle:
+ bundle-windows:
runs-on: [self-hosted, windows, x64]
- strategy:
- matrix:
- config:
- - 'release'
- arch:
- - 'x64'
-
env:
VCPKG_VERSION: 2022.03.10
@@ -42,7 +35,11 @@ jobs:
with:
path: |
${{ github.workspace }}\.vcpkg\installed
- key: ${{ runner.os }}-${{ matrix.config }}-${{env.VCPKG_VERSION}}-${{ hashFiles('xmake.lua') }}-${{ matrix.arch }}-v5
+ key: ${{ runner.os }}-release-${{env.VCPKG_VERSION}}-${{ hashFiles('xmake.lua') }}-x64-v5
+
+ - name: Update path for 7zip
+ run: |
+ echo "C:\'Program Files'\7-Zip\7z.exe" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Bundle
run: |
@@ -51,22 +48,14 @@ jobs:
VCPKG_ROOT: ${{ github.workspace }}/.vcpkg
- uses: actions/upload-artifact@v3
- name: upload ${{matrix.target}}
+ name: upload artifacts
with:
- name: linux_x64-${{matrix.target}}-${{matrix.config}}
- path: |
- build/zenserver-win64.zip
+ name: zenserver-win64
+ path: build/zenserver-win64.zip
- linux-bundle:
+ bundle-linux:
runs-on: [self-hosted, linux, x64]
- strategy:
- matrix:
- config:
- - 'release'
- arch:
- - 'x64'
-
env:
VCPKG_VERSION: 2022.03.10
@@ -96,7 +85,7 @@ jobs:
with:
path: |
${{ github.workspace }}/.vcpkg/installed
- key: ${{ runner.os }}-${{ matrix.config }}-${{env.VCPKG_VERSION}}-${{ hashFiles('xmake.lua') }}-${{ matrix.arch }}-v5
+ key: ${{ runner.os }}-release-${{env.VCPKG_VERSION}}-${{ hashFiles('xmake.lua') }}-x64-v5
- name: Bundle
run: |
@@ -105,8 +94,44 @@ jobs:
VCPKG_ROOT: ${{ github.workspace }}/.vcpkg
- uses: actions/upload-artifact@v3
- name: upload ${{matrix.target}}
+ name: upload zenserver-linux
with:
- name: linux_x64-${{matrix.target}}-${{matrix.config}}
- path: |
- build/zenserver-linux.zip
+ name: zenserver-linux
+ path: build/zenserver-linux.zip
+
+ create-release:
+ runs-on: ubuntu-latest
+ needs: [bundle-linux, bundle-win32]
+ steps:
+ - name: Download Linux artifacts
+ uses: actions/download-artifact@v1
+ with:
+ name: zenserver-linux
+ path: zenserver-linux.zip
+
+ - name: Download Windows artifacts
+ uses: actions/download-artifact@v1
+ with:
+ name: zenserver-win64
+ path: zenserver-win64.zip
+
+ - name: Check prerelease
+ id: get-prerelease
+ uses: haya14busa/action-cond@v1
+ with:
+ cond: ${{contains(github.ref, '-pre')}}
+ if_true: "true"
+ if_false: "false"
+
+ - name: Create Release
+ id: create_release
+ uses: softprops/action-gh-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: ${{github.ref.name}}
+ body: |
+ ${{steps.read_changelog.outputs.contents}}
+ draft: false
+ prerelease: ${{steps.get-prerelease.outputs.value}}
+ files: "*.zip"