fix: update goreleaser config after testing

This commit is contained in:
Jennifer Power
2021-04-28 06:53:07 -04:00
parent 5092d6c62e
commit 051fe88c33
2 changed files with 10 additions and 46 deletions

View File

@@ -38,7 +38,7 @@ jobs:
- name: Generate release notes
run: |
echo 'CHANGELOG' > /tmp/release.txt
github-release-notes -org rancherfederal -repo toolkit -since-latest-release -include-author >> /tmp/release.txt
github-release-notes -org rancherfederal -repo hauler -since-latest-release -include-author >> /tmp/release.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser
@@ -46,14 +46,15 @@ jobs:
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --release-notes=/tmp/release.txt --skip-validate
args: release --release-notes=/tmp/release.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload assets
uses: actions/upload-artifact@v2
with:
name: hauler
path: dist/*
path: dist/hauler_linux_amd64/hauler
retention-days: 2
create-artifacts:
runs-on: ubuntu-latest
@@ -62,9 +63,8 @@ jobs:
- name: Download Hauler binary
id: download
uses: actions/download-artifact@v2
- name: Run Hauler package
run: |
echo "Running hauler"
- name: Run Hauler bundle
run: hauler bundle
- name: Upload default package to Release
id: upload-release-asset
uses: actions/upload-release-asset@v1
@@ -72,7 +72,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs,create-release.outputs.upload_url }}
asset_path: ${{github.workspace}}/bundle.tar.gz
asset_path: ${{github.workspace}}/bundle/bundle.tar.gz
asset_name: bundle.tar.gz
asset_content_type: application/gzip

View File

@@ -2,49 +2,13 @@ project_name: hauler
before:
hooks:
- go mod tidy
- go generate ./...
builds:
- <<: &build_defaults
binary: hauler
main: ./cmd/
ldflags:
- -s -w -X main.VERSION={{ .Version }}
env:
- CGO_ENABLED=0
id: linux
- main: cmd/haulerctl/main.go
goos:
- linux
goarch:
- amd64
- arm64
- arm
goarm:
- 7
- <<: *build_defaults
id: darwin
goos:
- darwin
goarch:
- amd64
- arm64
- <<: *build_defaults
id: windows
goos:
- windows
archives:
- name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
id: nix
builds: [linux, darwin]
format: tar.gz
files:
- none*
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
env:
- CGO_ENABLED=0