From add1cbb4846c92ab6ca52047d31c63ddf77e1a87 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 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b01a9d9c..aa9d77f10 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,8 @@ jobs: 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 @@ -70,6 +72,8 @@ jobs: 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/*"