From 7e69060de0ada1f1b855892200fe529909212214 Mon Sep 17 00:00:00 2001 From: connlost <4348524953.h@gmail.com> Date: Fri, 26 Apr 2024 21:01:01 +0800 Subject: [PATCH] try update workflows --- .github/workflows/dev-build.yml | 4 ++-- .github/workflows/release-build.yml | 20 +++++++++++++------- .github/workflows/release-ghcr.yml | 2 +- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index 8dfeb83..3a1ccd6 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -6,7 +6,7 @@ on: - release jobs: - dev-release: + dev-build: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] @@ -40,5 +40,5 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: Palworld_Pal_Editor_${{ matrix.os }}_artifact + name: Palworld_Pal_Editor_${{ runner.os }}_artifact path: ./dist/ \ No newline at end of file diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index da39def..d1be1e6 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -8,7 +8,7 @@ on: - "v*" jobs: - dev-release: + release-build: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] @@ -29,20 +29,26 @@ jobs: with: node-version: 20 - - name: Run Windows Builder Script + - name: Windows Build if: runner.os == 'Windows' shell: pwsh - run: ./build_executable.ps1 - - - name: Run Unix-like Builder Script + run: | + ./build_executable.ps1 + $tagName = "${{ github.ref_name }}" + Rename-Item ./dist/palworld-pal-editor.exe "palworld-pal-editor-$tagName-${{ runner.os }}.exe" + + - name: Unix-like Build if: runner.os != 'Windows' shell: bash - run: ./build_executable.sh + run: | + ./build_executable.sh + tagName=${GITHUB_REF#refs/tags/} + mv ./dist/palworld-pal-editor ./dist/palworld-pal-editor-$tagName-${{ runner.os }} - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: Palworld_Pal_Editor_${{ matrix.os }}_artifact + name: Palworld_Pal_Editor_${{ runner.os }}_artifact path: ./dist/ - name: Create and Upload Release diff --git a/.github/workflows/release-ghcr.yml b/.github/workflows/release-ghcr.yml index b41eafe..74e625f 100644 --- a/.github/workflows/release-ghcr.yml +++ b/.github/workflows/release-ghcr.yml @@ -8,7 +8,7 @@ on: - "v*" jobs: - build-and-push: + build-and-push-docker-image: runs-on: ubuntu-latest permissions: contents: read