diff --git a/.fpm b/.fpm index f2af1180..e3bd0e9e 100644 --- a/.fpm +++ b/.fpm @@ -5,5 +5,4 @@ --url "https//:github.com/gravitl/netmaker" --maintainer "info@gravitl.com" --vendor Gravitl -netclient/build/netclient.service=/lib/systemd/system/netclient.service diff --git a/.github/workflows/buildandrelease.yml b/.github/workflows/buildandrelease.yml index 6a4fc2b7..ff476de2 100644 --- a/.github/workflows/buildandrelease.yml +++ b/.github/workflows/buildandrelease.yml @@ -49,15 +49,15 @@ jobs: env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="-X 'main.version=${NETMAKER_VERSION}'" -o build/netclient-darwin/netclient main.go env CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="-X 'main.version=${NETMAKER_VERSION}'" -o build/netclient-darwin-arm64/netclient main.go - # - name: Upload netmaker x86 to Release - # uses: svenstaro/upload-release-action@v2 - # with: - # repo_token: ${{ secrets.GITHUB_TOKEN }} - # file: build/netmaker - # tag: ${{ env.NETMAKER_VERSION }} - # overwrite: true - # prerelease: true - # asset_name: netmaker + - name: Upload netmaker x86 to Release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: build/netmaker + tag: ${{ env.NETMAKER_VERSION }} + overwrite: true + prerelease: true + asset_name: netmaker - name: Upload x86 to Release uses: svenstaro/upload-release-action@v2 @@ -69,6 +69,36 @@ jobs: prerelease: true asset_name: netclient + - name: Package x86 deb + uses: gravitl/github-action-fpm@master + with: + fpm_args: './netclient/build/netclient=/sbin/netclient ./netclient/build/netclient.service=/lib/systemd/system/netclient.service' + fpm_opts: '--debug -s dir -t deb --architecture amd64 --version ${{ env.PACKAGE_VERSION }}' + - name: Upload x86 deb to Release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: netclient_${{ env.PACKAGE_VERSION }}_amd64.deb + tag: ${{ env.NETMAKER_VERSION }} + overwrite: true + prerelease: true + asset_name: netclient_${{ env.PACKAGE_VERSION }}_amd64.deb + + - name: Package x86 rpm + uses: gravitl/github-action-fpm@master + with: + fpm_args: './netclient/build/netclient=/sbin/netclient ./netclient/build/netclient.service=/lib/systemd/system/netclient.service' + fpm_opts: '-s dir -t rpm --architecture amd64 --version ${{ env.PACKAGE_VERSION }}' + - name: Upload x86 rpm to Release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: netclient_${{ env.PACKAGE_VERSION }}_amd64.rpm + tag: ${{ env.NETMAKER_VERSION }} + overwrite: true + prerelease: true + asset_name: netclient_${{ env.PACKAGE_VERSION }}_amd64.rpm + #- name: Upload arm5 to Release # uses: svenstaro/upload-release-action@v2 # with: @@ -99,15 +129,46 @@ jobs: # prerelease: true # asset_name: netclient-arm7 - #- name: Upload arm64 to Release - # uses: svenstaro/upload-release-action@v2 - # with: - # repo_token: ${{ secrets.GITHUB_TOKEN }} - # file: netclient/build/netclient-arm64/netclient - # tag: ${{ env.NETMAKER_VERSION }} - # overwrite: true - # prerelease: true - # asset_name: netclient-arm64 + - name: Upload arm64 to Release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: netclient/build/netclient-arm64/netclient + tag: ${{ env.NETMAKER_VERSION }} + overwrite: true + prerelease: true + asset_name: netclient-arm64 + + - name: Package arm64 deb + uses: gravitl/github-action-fpm@master + with: + fpm_args: './netclient/build/netclient-arm64/netclient=/sbin/netclient ./netclient/build/netclient.service=/lib/systemd/netclient.service' + fpm_opts: '--debug -s dir -t deb --architecture arm64 --version ${{ env.PACKAGE_VERSION }}' + - name: Upload arm deb to Release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: netclient_${{ env.PACKAGE_VERSION }}_arm64.deb + tag: ${{ env.NETMAKER_VERSION }} + overwrite: true + prerelease: true + asset_name: netclient_${{ env.PACKAGE_VERSION }}_arm64.deb + + - name: Package arm64 rpm + uses: gravitl/github-action-fpm@master + with: + fpm_args: './netclient/build/netclient-arm64/netclient=/sbin/netclient ./netclient/build/netclient.service=/lib/systemd/netclient.service' + fpm_opts: '--debug -s dir -t rpm --architecture arm64 --version ${{ env.PACKAGE_VERSION }}' + - name: Upload arm64 rpm to Release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: netclient_${{ env.PACKAGE_VERSION }}_arm64.rpm + tag: ${{ env.NETMAKER_VERSION }} + overwrite: true + prerelease: true + asset_name: netclient_${{ env.PACKAGE_VERSION }}_arm64.rpm + #- name: Upload mipsle to Release # uses: svenstaro/upload-release-action@v2 @@ -189,32 +250,4 @@ jobs: # prerelease: true # asset_name: netclient-darwin-arm64 - - name: Package x86 deb - uses: gravitl/github-action-fpm@master - with: - fpm_args: './netclient/build/netclient=/sbin/netclient ./netclient/build/netclient.service=/lib/systemd/system/netclient.service' - fpm_opts: '--debug -s dir -t deb --architecture amd64 --version ${{ env.PACKAGE_VERSION }}' - - name: Upload x86 deb to Release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: netclient_${{ env.PACKAGE_VERSION }}_amd64.deb - tag: ${{ env.NETMAKER_VERSION }} - overwrite: true - prerelease: true - asset_name: netclient_${{ env.PACKAGE_VERSION }}_amd64.deb - - name: Package arm64 deb - uses: gravitl/github-action-fpm@master - with: - fpm_args: './netclient/build/netclient-arm64/netclient=/sbin/netclient ./netclient/build/netclient.service=/lib/systemd/netclient.service' - fpm_opts: '--debug -s dir -t deb --architecture arm64 --version ${{ env.PACKAGE_VERSION }}' - - name: Upload x86 deb to Release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: netclient_${{ env.PACKAGE_VERSION }}_arm64.deb - tag: ${{ env.NETMAKER_VERSION }} - overwrite: true - prerelease: true - asset_name: netclient_${{ env.PACKAGE_VERSION }}_arm64.deb