diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dd78a7723..681052fad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,6 +45,12 @@ jobs: build: needs: check + outputs: + linux-x64-sha: ${{ steps.sha.outputs.linux-x64-sha256 }} + linux-arm64-sha: ${{ steps.sha.outputs.linux-arm64-sha256 }} + linux-arm-sha: ${{ steps.sha.outputs.linux-arm-sha256 }} + win-x64-sha: ${{ steps.sha.outputs.win-x64-sha256 }} + osx-x64-sha: ${{ steps.sha.outputs.osx-x64-sha256 }} strategy: matrix: runtime: [ linux-x64, linux-arm64, linux-arm, win-x64, osx-x64 ] @@ -101,7 +107,19 @@ jobs: with: name: runner-packages path: _package - + # compute shas and set as job outputs to use in release notes + - run: brew install coreutils #needed for shasum util + if: ${{ matrix.os == 'macOS-latest' }} + name: Install Dependencies for SHA Calculation (osx) + - run: | + file=$(ls) + sha=$(sha256sum $file | awk '{ print $1 }') + echo "Computed sha256: $sha for $file" + echo "::set-output name=${{matrix.runtime}}-sha256::$sha" + shell: bash + id: sha + name: Compute SHA256 + working-directory: _package release: needs: build runs-on: ubuntu-latest @@ -126,11 +144,15 @@ jobs: const core = require('@actions/core') const fs = require('fs'); const runnerVersion = fs.readFileSync('${{ github.workspace }}/src/runnerversion', 'utf8').replace(/\n$/g, '') - const releaseNote = fs.readFileSync('${{ github.workspace }}/releaseNote.md', 'utf8').replace(//g, runnerVersion) + var releaseNote = fs.readFileSync('${{ github.workspace }}/releaseNote.md', 'utf8').replace(//g, runnerVersion) + releaseNote = releaseNote.replace(//g, '${{needs.build.outputs.win-x64-sha}}') + releaseNote = releaseNote.replace(//g, '${{needs.build.outputs.osx-x64-sha}}') + releaseNote = releaseNote.replace(//g, '${{needs.build.outputs.linux-x64-sha}}') + releaseNote = releaseNote.replace(//g, '${{needs.build.outputs.linux-arm-sha}}') + releaseNote = releaseNote.replace(//g, '${{needs.build.outputs.linux-arm64-sha}}') console.log(releaseNote) core.setOutput('version', runnerVersion); - core.setOutput('note', releaseNote); - + core.setOutput('note', releaseNote); # Create GitHub release - uses: actions/create-release@master id: createRelease @@ -193,4 +215,4 @@ jobs: upload_url: ${{ steps.createRelease.outputs.upload_url }} asset_path: ${{ github.workspace }}/actions-runner-linux-arm64-${{ steps.releaseNote.outputs.version }}.tar.gz asset_name: actions-runner-linux-arm64-${{ steps.releaseNote.outputs.version }}.tar.gz - asset_content_type: application/octet-stream \ No newline at end of file + asset_content_type: application/octet-stream diff --git a/releaseNote.md b/releaseNote.md index db041ca82..2983dafe8 100644 --- a/releaseNote.md +++ b/releaseNote.md @@ -67,3 +67,13 @@ tar xzf ./actions-runner-linux-arm-.tar.gz ## Using your self hosted runner For additional details about configuring, running, or shutting down the runner please check out our [product docs.](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/adding-self-hosted-runners) + +## SHA-256 Checksums + +The SHA-256 checksums for the packages included in this build are shown below: + +- actions-runner-win-x64-.zip +- actions-runner-osx-x64-.tar.gz +- actions-runner-linux-x64-.tar.gz +- actions-runner-linux-arm64-.tar.gz +- actions-runner-linux-arm-.tar.gz