-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
142 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: "Create SHA512 for a file" | ||
description: "Cross-platform helper: creates SHA512" | ||
|
||
inputs: | ||
filepath: | ||
description: "The input file path" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Generate SHA512 for Linux" | ||
shell: bash | ||
if: runner.os == 'Linux' | ||
run: sha512sum ${{ inputs.filepath }} > ${{ inputs.filepath }}.sha512 | ||
- name: "Generate SHA512 for Windows" | ||
shell: bash | ||
if: runner.os == 'Windows' | ||
run: certutil -hashfile ${{ inputs.filepath }} SHA512 >> ${{ inputs.filepath }}.sha512 | ||
- name: "Generate SHA512 for macOS" | ||
shell: bash | ||
if: runner.os == 'macOS' | ||
run: openssl dgst -sha512 > ${{ inputs.filepath }}.sha512 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: "Create zip of a directory" | ||
description: "Cross-platform helper: creates SHA512" | ||
|
||
inputs: | ||
input: | ||
description: "The input file path" | ||
required: true | ||
command: | ||
description: "The command to run first" | ||
required: true | ||
zipFilename: | ||
description: "The output file name" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Run pre-command" | ||
shell: bash | ||
run: ${{ inputs.command }} | ||
|
||
- name: "Generate zip for Linux" | ||
if: runner.os == 'Linux' || runner.os == 'MacOS' | ||
shell: bash | ||
run: zip -r ${{inputs.zipFilename}} ${{inputs.input}} | ||
|
||
- name: "Generate zip for Windows" | ||
if: runner.os == 'Windows' | ||
shell: powershell | ||
run: Compress-Archive -Path ${{inputs.input}} -Destination ${{inputs.zipFilename}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters