From bea8e8e52853a995666e65563fea2703dffc4ed8 Mon Sep 17 00:00:00 2001 From: Gatsik <74517072+Gatsik@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:41:27 +0300 Subject: [PATCH] Use outputs to pass information between jobs --- .github/workflows/release.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b01a9d9c..b0b220a5d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,9 +12,11 @@ env: BUILD_VERSION: ${{ github.event.inputs.version }} jobs: - build-windows: + build_windows: environment: deploy runs-on: windows-latest + outputs: + MSI_SUM: ${{ steps.checksum.outputs.MSI_SUM }} steps: - uses: actions/checkout@v4 @@ -59,7 +61,7 @@ jobs: run: | $MSI_SUM = $(Get-FileHash dist/*).hash Write-Host $MSI_SUM - echo "MSI_SUM=$MSI_SUM" >> "$env:GITHUB_ENV" + echo "MSI_SUM=$MSI_SUM" >> "$env:GITHUB_OUTPUT" - name: Upload artifact uses: actions/upload-artifact@v4 @@ -67,9 +69,11 @@ jobs: name: client-windows path: dist/* - build-linux: + build_linux: runs-on: ubuntu-latest environment: release + outputs: + TAR_SUM: ${{ steps.checksum.outputs.TAR_SUM }} steps: - uses: actions/checkout@v4 @@ -134,7 +138,7 @@ jobs: run: | TAR_SUM=$(echo faforever.tar.gz -n | sha256sum) echo $TAR_SUM - echo "TAR_SUM=$TAR_SUM" >> $GITHUB_ENV + echo "TAR_SUM=$TAR_SUM" >> "$GITHUB_OUTPUT" - name: Upload artifact uses: actions/upload-artifact@v4 @@ -167,7 +171,7 @@ jobs: with: commit: ${{ github.sha }} tag: ${{ github.event.inputs.version }} - body: "SHA256 (Windows): ${{ env.MSI_SUM }}\nSHA256 (Linux): ${{ env.TAR_SUM }}" + body: "SHA256 (Windows): ${{ build_windows.outputs.MSI_SUM }}\nSHA256 (Linux): ${{ build_linux.outputs.TAR_SUM }}" draft: true prerelease: true artifacts: "release-artifacts/*"