From 6987af400f044322da1deb9aea5ef23d4aa1ea19 Mon Sep 17 00:00:00 2001 From: kgersen Date: Thu, 24 Nov 2022 17:12:16 +0100 Subject: [PATCH] add upload to gh --- .github/workflows/go-ossf-slsa3-publish.yml | 23 ++++++++++++++++++++- .slsa-goreleaser.yml | 2 +- README.md | 2 ++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go-ossf-slsa3-publish.yml b/.github/workflows/go-ossf-slsa3-publish.yml index f481caf..f847ea0 100644 --- a/.github/workflows/go-ossf-slsa3-publish.yml +++ b/.github/workflows/go-ossf-slsa3-publish.yml @@ -40,4 +40,25 @@ jobs: with: go-version: 1.19 # Optional: only needed if using ldflags. - 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}}" \ No newline at end of file + 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}}" + +# Upload to GitHub release. + upload: + permissions: + contents: write + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 + with: + name: ${{ needs.build.outputs.go-binary-name }} + - uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 + with: + name: ${{ needs.build.outputs.go-binary-name }}.intoto.jsonl + - name: Release + uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + ${{ needs.build.outputs.go-binary-name }} + ${{ needs.build.outputs.go-binary-name }}.intoto.jsonl \ No newline at end of file diff --git a/.slsa-goreleaser.yml b/.slsa-goreleaser.yml index 6fc648e..20a31e8 100644 --- a/.slsa-goreleaser.yml +++ b/.slsa-goreleaser.yml @@ -26,7 +26,7 @@ goarch: amd64 # Binary output name. # {{ .Os }} will be replaced by goos field in the config file. # {{ .Arch }} will be replaced by goarch field in the config file. -binary: binary-{{ .Os }}-{{ .Arch }} +binary: nspeed-mini-{{ .Os }}-{{ .Arch }} # (Optional) ldflags generated dynamically in the workflow, and set as the `evaluated-envs` input variables in the workflow. # ldflags: diff --git a/README.md b/README.md index 173d6dc..e7865f6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![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) + ## golang std lib http/2 throughput speed is much slower than http/1 `go run main.go` on Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz gives: