From 8551afe04e75a931e2df8bbe27495c4d831ace29 Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Tue, 12 Oct 2021 12:15:45 +0200 Subject: [PATCH] enhancement: Support new architectures and auto upload packages to repo (#128) * adding uploads * adding uploads * adding uploads * adding uploads * adding uploads * adding uploads * use https://pkgs.wiretrustee.com/ * use https://pkgs.wiretrustee.com/ * use https://pkgs.wiretrustee.com/ * set yum id * secrets for goreleaser uploads * ensure Github release is enabled --- .github/workflows/release.yml | 2 ++ .goreleaser.yaml | 57 ++++++++++++++++++++++++++++++++--- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a0b7797b..251c777a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,6 +51,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} + UPLOAD_DEBIAN_SECRET: ${{ secrets.PKG_UPLOAD_SECRET }} + UPLOAD_YUM_SECRET: ${{ secrets.PKG_UPLOAD_SECRET }} - name: Trigger Windows binaries sign pipeline diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 4d34caf9c..4a956e2a6 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -13,13 +13,18 @@ builds: - arm - amd64 - arm64 + - mips + gomips: + - hardfloat + - softfloat ignore: - - goos: darwin - goarch: arm64 - goos: windows goarch: arm64 - goos: windows goarch: arm + ldflags: + - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}} -X main.builtBy=goreleaser + mod_timestamp: '{{ .CommitTimestamp }}' tags: - load_wintun_from_rsrc @@ -32,6 +37,9 @@ builds: goarch: - amd64 - arm64 + ldflags: + - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}} -X main.builtBy=goreleaser + mod_timestamp: '{{ .CommitTimestamp }}' - id: wiretrustee-signal dir: signal @@ -42,17 +50,40 @@ builds: goarch: - amd64 - arm64 + ldflags: + - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.CommitDate}} -X main.builtBy=goreleaser + mod_timestamp: '{{ .CommitTimestamp }}' archives: - builds: - wiretrustee nfpms: - - maintainer: Wiretrustee - description: Wiretrustee project. + - maintainer: Wiretrustee + description: Wiretrustee client. homepage: https://wiretrustee.com/ + id: deb builds: - wiretrustee formats: - deb + contents: + - src: release_files/wiretrustee.service + dst: /lib/systemd/system/wiretrustee.service + + - src: release_files/wiretrustee.json + dst: /etc/wiretrustee/wiretrustee.json + type: "config|noreplace" + + scripts: + postinstall: "release_files/post_install.sh" + replacements: + arm6: armf + - maintainer: Wiretrustee + description: Wiretrustee client. + homepage: https://wiretrustee.com/ + id: rpm + builds: + - wiretrustee + formats: - rpm contents: - src: release_files/wiretrustee.service @@ -196,4 +227,20 @@ brews: homepage: https://wiretrustee.com/ license: "BSD3" test: | - system "#{bin}/{{ .ProjectName }} -h" \ No newline at end of file + system "#{bin}/{{ .ProjectName }} -h" + +uploads: + - name: debian + ids: + - deb + mode: archive + target: https://pkgs.wiretrustee.com/debian/pool/{{ .ArtifactName }};deb.distribution=stable;deb.component=main;deb.architecture={{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }} + username: dev@wiretrustee.com + method: PUT + - name: yum + ids: + - rpm + mode: archive + target: https://pkgs.wiretrustee.com/yum/{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }} + username: dev@wiretrustee.com + method: PUT \ No newline at end of file