Skip to content

Commit

Permalink
put sha1sum into release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Istador committed Aug 7, 2022
1 parent 3b721a8 commit 771c35e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ outputs:
filename:
description : 'Filename for the build artifacts'
value : ${{ steps.env.outputs.filename }}
sha1sum:
description : 'Hashes of the output files'
value : ${{ steps.build.outputs.sha1sum }}


runs:
Expand Down Expand Up @@ -43,9 +46,16 @@ runs:
cache-to : type=gha,scope=smo-downgrade-build,mode=max
-
name : Build mod
id : build
shell : bash
run: |
./docker-build.sh ${{ (steps.env.outputs.version != '' && steps.env.outputs.version) || '' }}
cd ./out/
hashes=`sha1sum ${{ steps.env.outputs.filename }}.*`
hashes="${hashes//'%'/'%25'}"
hashes="${hashes//$'\n'/'%0A'}"
hashes="${hashes//$'\r'/'%0D'}"
echo "::set-output name=sha1sum::$hashes"
-
name : Upload artifacts
uses : actions/upload-artifact@v3
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ inputs:
tag:
description : 'Version tag'
required : true
body:
description : 'Release description'
required : false
default : ''
GITHUB_TOKEN:
description : 'Secret GitHub token required to create the release'
required : true
Expand All @@ -31,6 +35,6 @@ runs:
with:
tag_name : ${{ inputs.tag }}
release_name : Release ${{ inputs.tag }}
body : ''
body : ${{ inputs.body }}
draft : true
prerelease : false
10 changes: 8 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
build:
runs-on: ubuntu-latest
outputs:
filename: ${{ steps.build.outputs.filename }}
filename : ${{ steps.build.outputs.filename }}
sha1sum : ${{ steps.build.outputs.sha1sum }}
steps:
-
name : Checkout
Expand All @@ -38,7 +39,12 @@ jobs:
id : release
uses : ./.github/actions/release
with:
tag : ${{ github.ref_name }}
tag : ${{ github.ref_name }}
body : |
```
$ sha1sum ${{ needs.build.outputs.filename }}.*
${{ needs.build.outputs.sha1sum }}
```
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
-
name : Attach build artifacts to release
Expand Down

0 comments on commit 771c35e

Please sign in to comment.