Skip to content

Commit 6987af4

Browse files
committed
add upload to gh
1 parent 3f2beb2 commit 6987af4

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

.github/workflows/go-ossf-slsa3-publish.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,25 @@ jobs:
4040
with:
4141
go-version: 1.19
4242
# Optional: only needed if using ldflags.
43-
evaluated-envs: "COMMIT_DATE:${{needs.args.outputs.commit-date}}, COMMIT:${{needs.args.outputs.commit}}, VERSION:${{needs.args.outputs.version}}, TREE_STATE:${{needs.args.outputs.tree-state}}"
43+
evaluated-envs: "COMMIT_DATE:${{needs.args.outputs.commit-date}}, COMMIT:${{needs.args.outputs.commit}}, VERSION:${{needs.args.outputs.version}}, TREE_STATE:${{needs.args.outputs.tree-state}}"
44+
45+
# Upload to GitHub release.
46+
upload:
47+
permissions:
48+
contents: write
49+
runs-on: ubuntu-latest
50+
needs: build
51+
steps:
52+
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741
53+
with:
54+
name: ${{ needs.build.outputs.go-binary-name }}
55+
- uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741
56+
with:
57+
name: ${{ needs.build.outputs.go-binary-name }}.intoto.jsonl
58+
- name: Release
59+
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
60+
if: startsWith(github.ref, 'refs/tags/')
61+
with:
62+
files: |
63+
${{ needs.build.outputs.go-binary-name }}
64+
${{ needs.build.outputs.go-binary-name }}.intoto.jsonl

.slsa-goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ goarch: amd64
2626
# Binary output name.
2727
# {{ .Os }} will be replaced by goos field in the config file.
2828
# {{ .Arch }} will be replaced by goarch field in the config file.
29-
binary: binary-{{ .Os }}-{{ .Arch }}
29+
binary: nspeed-mini-{{ .Os }}-{{ .Arch }}
3030

3131
# (Optional) ldflags generated dynamically in the workflow, and set as the `evaluated-envs` input variables in the workflow.
3232
# ldflags:

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![SLSA go releaser](https://github.com/nspeed-app/http2issue/actions/workflows/go-ossf-slsa3-publish.yml/badge.svg)](https://github.com/nspeed-app/http2issue/actions/workflows/go-ossf-slsa3-publish.yml)
2+
13
## golang std lib http/2 throughput speed is much slower than http/1
24

35
`go run main.go` on Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz gives:

0 commit comments

Comments
 (0)