diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13ca534f..fec35f66 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,21 @@ jobs: env: FURY_TOKEN: ${{ secrets.FURY_TOKEN }} run: | - curl -F package=@dist/qcadmin*linux_amd64.deb https://{$FURY_TOKEN}@push.fury.io/qucheng/ - curl -F package=@dist/qcadmin*linux_arm64.deb https://{$FURY_TOKEN}@push.fury.io/qucheng/ - curl -F package=@dist/qcadmin*linux_amd64.rpm https://{$FURY_TOKEN}@push.fury.io/qucheng/ - curl -F package=@dist/qcadmin*linux_arm64.rpm https://{$FURY_TOKEN}@push.fury.io/qucheng/ + for filename in dist/*.deb; do + if [[ "$filename" == *"arm"* ]]; then + echo "Skipping $filename" + continue + fi + echo "Pushing $filename to apt repository" + curl -F package=@$filename https://${FURY_TOKEN}@push.fury.io/qucheng/ + curl -F package=@$filename https://${FURY_TOKEN}@push.fury.io/qucheng/ + done + for filename in dist/*.rpm; do + if [[ "$filename" == *"arm"* ]]; then + echo "Skipping $filename" + continue + fi + echo "Pushing $filename to rpm repository" + curl -F package=@$filename https://${FURY_TOKEN}@push.fury.io/qucheng/ + curl -F package=@$filename https://${FURY_TOKEN}@push.fury.io/qucheng/ + done diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f71ca601..9043a3f5 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -8,9 +8,9 @@ env: before: hooks: + - make generate - ./hack/scripts/gencompletions.sh - ./hack/scripts/genmanpages.sh - - make generate # - make default builds: - ldflags: @@ -100,7 +100,7 @@ snapshot: name_template: "{{ .Version }}-snapshot-{{.ShortCommit}}" nfpms: -- file_name_template: '{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}' +- file_name_template: 'qcadmin_{{ .Tag }}_{{ .Os }}_{{ .Arch }}' homepage: https://www.qucheng.com version_metadata: git description: |- @@ -200,8 +200,3 @@ changelog: order: 10 - title: Other work order: 999 - -release: - footer: | - **Full Changelog**: https://github.com/easysoft/qucheng_cli/compare/{{ .PreviousTag }}...{{ .Tag }} - diff --git a/hack/scripts/upload-gemfury.sh b/hack/scripts/upload-gemfury.sh new file mode 100755 index 00000000..b4a7f766 --- /dev/null +++ b/hack/scripts/upload-gemfury.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +for filename in dist/*.deb; do + if [[ "$filename" == *"arm"* ]]; then + echo "Skipping $filename" + continue + fi + echo "Pushing $filename to apt repository" + # curl -F package=@$filename https://${FURY_TOKEN}@push.fury.io/qucheng/ + #curl -F package=@$filename https://${FURY_TOKEN}@push.fury.io/qucheng/ +done +for filename in dist/*.rpm; do + if [[ "$filename" == *"arm"* ]]; then + echo "Skipping $filename" + continue + fi + echo "Pushing $filename to rpm repository" + # curl -F package=@$filename https://${FURY_TOKEN}@push.fury.io/qucheng/ + # curl -F package=@$filename https://${FURY_TOKEN}@push.fury.io/qucheng/ +done