From 051fe88c3372971f9fc490fd07d1a4014e189492 Mon Sep 17 00:00:00 2001 From: Jennifer Power Date: Wed, 28 Apr 2021 06:53:07 -0400 Subject: [PATCH] fix: update goreleaser config after testing --- .github/workflows/ci.yaml | 14 ++++++------- .goreleaser.yml | 42 +++------------------------------------ 2 files changed, 10 insertions(+), 46 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 84067d9..6149b9e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml index 0e39142..ac328d6 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -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 \ No newline at end of file