Skip to content

Commit

Permalink
Merge pull request #1 from plyr4/test/git-info
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 authored Mar 29, 2024
2 parents 9cae484 + fe63209 commit 664a60f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
type: string
description: path to github project, in format <owner>/<repo>
required: true
default: plyr4/unity-ufo

ref:
type: string
Expand Down Expand Up @@ -57,8 +58,8 @@ jobs:
- name: write git info
id: git
run: |
echo ::set-output name=commit_message::$(git log -1 --pretty=%B)
echo ::set-output name=commit_hash::$(git rev-parse --short HEAD)
echo "commit_message=$(git log -1 --pretty=%B)" >> "$GITHUB_OUTPUT"
echo "commit_hash=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: free disk space
run: |
Expand Down Expand Up @@ -119,6 +120,8 @@ jobs:
matrix-key: ${{ matrix.targetPlatform }}
outputs: |-
releases: ${{ steps.release.outputs.assets }}
commit_hash: "${{ steps.git.outputs.commit_hash }}"
commit_message: "${{ steps.git.outputs.commit_message }}"
read:
runs-on: ubuntu-latest
Expand All @@ -132,6 +135,8 @@ jobs:
matrix-step-name: release
outputs:
result: ${{ steps.read.outputs.result }}
commit_hash: "${{ steps.read.outputs.commit_hash }}"
commit_message: "${{ steps.read.outputs.commit_message }}"

deploy:
needs: read
Expand Down Expand Up @@ -175,8 +180,8 @@ jobs:
env:
LINUX_BUILD_LINK: ${{ fromJson(needs.read.outputs.result).releases.StandaloneLinux64[0].browser_download_url }}
WINDOWS_BUILD_LINK: ${{ fromJson(needs.read.outputs.result).releases.StandaloneWindows64[0].browser_download_url }}
BUILD_COMMIT: ${{ steps.git.outputs.commit_hash }}
BUILD_COMMIT_MESSAGE: ${{ steps.git.outputs.commit_message }}
BUILD_COMMIT: "${{ fromJson(needs.read.outputs.result).commit_hash.WebGL }}"
BUILD_COMMIT_MESSAGE: "${{ fromJson(needs.read.outputs.result).commit_message.WebGL }}"
with:
input: ./index.html
output: ./index.html
Expand Down

0 comments on commit 664a60f

Please sign in to comment.