Skip to content

Commit c3b74c5

Browse files
authored
create checksum.txt from all uploaded binaries (#514)
1 parent be6231c commit c3b74c5

File tree

1 file changed

+42
-17
lines changed

1 file changed

+42
-17
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ jobs:
3535
command: build
3636
args: --release --target ${{matrix.target}}
3737

38+
- name: Rename binary
39+
run: |
40+
mv target/${{ matrix.target }}/release/parseable Parseable_${{ matrix.target }}
41+
3842
- name: Create Artifact
3943
uses: actions/upload-artifact@v3
4044
with:
4145
name: Parseable_${{ matrix.target }}
42-
path: target/${{ matrix.target }}/release/parseable
43-
44-
- name: Rename binary
45-
run: |
46-
mv target/${{ matrix.target }}/release/parseable Parseable_${{ matrix.target }}
46+
path: Parseable_${{ matrix.target }}
4747

4848
- name: Publish Archive to Release Page
4949
uses: softprops/[email protected]
@@ -71,16 +71,16 @@ jobs:
7171
- name: Build
7272
run: cargo build --all --release --target x86_64-pc-windows-msvc
7373

74-
- name: Create artifact for Windows
75-
uses: actions/upload-artifact@v2
76-
with:
77-
name: Parseable_x86_64-pc-windows-msvc
78-
path: target/x86_64-pc-windows-msvc/release/PARSEABLE.exe
79-
8074
- name: Rename binary
8175
run: |
8276
mv target/x86_64-pc-windows-msvc/release/PARSEABLE.exe Parseable_x86_64-pc-windows-msvc.exe
8377
78+
- name: Create artifact for Windows
79+
uses: actions/upload-artifact@v2
80+
with:
81+
name: Parseable_x86_64-pc-windows-msvc.exe
82+
path: Parseable_x86_64-pc-windows-msvc.exe
83+
8484
- name: Publish Archive to Release Page
8585
uses: softprops/[email protected]
8686
if: ${{ startsWith(github.ref, 'refs/tags/') }}
@@ -116,16 +116,15 @@ jobs:
116116
cargo build --release --target ${{ matrix.target }}
117117
strip target/${{ matrix.target }}/release/Parseable
118118
119+
- name: Rename binary
120+
run: |
121+
mv target/${{ matrix.target }}/release/Parseable Parseable_${{ matrix.target }}
122+
119123
- name: Create artifact
120124
uses: actions/upload-artifact@v2
121125
with:
122126
name: Parseable_${{ matrix.target }}
123-
path: |
124-
target/${{ matrix.target }}/release/Parseable
125-
126-
- name: Rename binary
127-
run: |
128-
mv target/${{ matrix.target }}/release/Parseable Parseable_${{ matrix.target }}
127+
path: Parseable_${{ matrix.target }}
129128

130129
- name: Publish Archive to Release Page
131130
uses: softprops/[email protected]
@@ -135,3 +134,29 @@ jobs:
135134
files: Parseable_${{ matrix.target }}
136135
env:
137136
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
137+
138+
create-checksum:
139+
runs-on: ubuntu-latest
140+
needs: [build-linux, build-windows, build-mac]
141+
steps:
142+
- name: Download artifacts created
143+
uses: actions/download-artifact@v3
144+
145+
- name: Run shasum command
146+
run: |
147+
find . -type f -name "Parseable_*" -exec shasum {} \; | sed 's/.\/.*\///' > checksum.txt
148+
149+
- name: Create artifact
150+
uses: actions/upload-artifact@v2
151+
with:
152+
name: checksum.txt
153+
path: checksum.txt
154+
155+
- name: Publish Check Sum to Release Page
156+
uses: softprops/[email protected]
157+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
158+
with:
159+
draft: false
160+
files: checksum.txt
161+
env:
162+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)