Skip to content

Commit

Permalink
.goreleaser.yml: improve releasing with goreleaser
Browse files Browse the repository at this point in the history
Adds GoReleaser[1] configuration file, that's later used
in Github Actions when a new tag is pushed to the server.

[1] https://goreleaser.com/

Signed-off-by: Charles Oliveira <charles.oliveira@linaro.org>
  • Loading branch information
chaws committed Jun 22, 2021
1 parent c694ca0 commit 40a7fdd
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 12 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,6 @@ jobs:
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --release-notes=/tmp/RELEASE_NOTES
args: release --rm-dist --release-notes=/tmp/RELEASE_NOTES
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Build assets
run: |
mkdir -p build/{linux,windows,darwin}
make OS=linux ARCH=amd64 build/vidx2pidx && mv build/vidx2pidx build/linux/
make OS=darwin ARCH=amd64 build/vidx2pidx && mv build/vidx2pidx build/darwin/
make OS=window ARCH=amd64 build/vidx2pidx.exe && mv build/vidx2pidx.exe build/windows/
- name: Upload assets
uses: actions/upload-artifact@v2
with:
name: vidx2pidx
path: build/*
29 changes: 29 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
project_name: vidx2pidx
builds:
- env: [CGO_ENABLED=0]
goos:
- linux
- windows
- darwin
goarch:
- amd64

archives:
- files:
- LICENSE.txt
- README.md
- CHANGELOG.md

format_overrides:
- goos: windows
format: zip

# Set to true, if you want all files in the archive to be in a single directory.
# If set to true and you extract the archive 'goreleaser_Linux_arm64.tar.gz',
# you get a folder 'goreleaser_Linux_arm64'.
# If set to false, all files are extracted separately.
# You can also set it to a custom folder name (templating is supported).
# Default is false.
wrap_in_directory: true


0 comments on commit 40a7fdd

Please sign in to comment.