-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
47 lines (34 loc) · 1.34 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: 'Release archive with hash'
author: 'Daniel J. Ching'
description: Upload a source archive and hash at every tagged release.
inputs:
release-tag:
description: 'The tag of the release to be uploaded.'
default: ${{ github.ref_name }}
project-name:
description: 'The name of the project.'
default: ${{ github.event.repository.name }}
token:
description: "Authorized secret GitHub Personal Access Token. Defaults to github.token"
required: false
default: ${{ github.token }}
runs:
using: "composite"
steps:
- name: Checkout the latest release
uses: actions/checkout@v3
- name: Creating a hashed git archive of the release in style of name-tag.zip
shell: bash
run: |
git archive --format=zip --output ${{ inputs.project-name }}-${{ inputs.release-tag }}.zip ${{ inputs.release-tag }}
sha256sum ${{ inputs.project-name }}-${{ inputs.release-tag }}.zip > ${{ inputs.project-name }}-${{ inputs.release-tag }}-sha256sum.txt
- name: Upload both files as artifacts to the release
uses: softprops/[email protected]
with:
files: |
${{ inputs.project-name }}-${{ inputs.release-tag }}-sha256sum.txt
${{ inputs.project-name }}-${{ inputs.release-tag }}.zip
token: ${{ inputs.token }}
branding:
icon: lock
color: gray-dark