Skip to content

Commit

Permalink
add CI to generate binaries on release
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMure committed Dec 3, 2021
1 parent fba1a96 commit c712650
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @EnchanterIO @MichaelMure @johanherman
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release `ipfs-upload-client` binaries

on:
release:
types: [created]

jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, windows/386, windows/amd64, darwin/amd64
goos: [linux, windows, darwin]
goarch: ["386", amd64]
exclude:
- goarch: "386"
goos: darwin
steps:
- uses: actions/checkout@v2
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
project_path: "."
binary_name: "ipfs-upload-client"
ldflags: "-s -w"
extra_files: Readme.md
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func main() {
}
}()

resolved, err := client.Unixfs().Add(ctx, file, caopts.Unixfs.Pin(*pin))
resolved, err := client.Unixfs().Add(ctx, file, caopts.Unixfs.Pin(*pin), caopts.Unixfs.Progress(true))
if err != nil {
_, _ = fmt.Fprintln(os.Stderr, err)
os.Exit(-1)
Expand Down

0 comments on commit c712650

Please sign in to comment.