From 0c12e0ec78ee5d1dd9d06f5aab2fcd439eccde13 Mon Sep 17 00:00:00 2001 From: dklimpel <5740567+dklimpel@users.noreply.github.com> Date: Sat, 18 May 2024 19:09:46 +0200 Subject: [PATCH 1/4] Add Github action to build release artifacts --- .github/workflows/release.yaml | 51 ++++++++++++++++++++++++++++++++++ Makefile | 8 +++++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 000000000..b9d680590 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,51 @@ +name: "Build release artifacts" +on: + push: + tags: + - "v*" + workflow_dispatch: + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Get version from tag + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + run: echo "TRAVIS_TAG=${{ github.ref_name }}" >> $GITHUB_ENV + + - run: make release + - run: make dgoss-sha256 dcgoss-sha256 kgoss-sha256 + + - name: "Upload binary as artifact" + uses: actions/upload-artifact@v4 + with: + name: build + path: | + release/* + extras/*/*goss + extras/*/*goss.sha256 + + attach-assets: + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + needs: ["build"] + runs-on: ubuntu-latest + steps: + - name: Fetch all binaries + uses: actions/download-artifact@v4 + - name: Attach to release + uses: softprops/action-gh-release@v2 + with: + files: | + release/* + extras/*/*goss + extras/*/*goss.sha256 diff --git a/Makefile b/Makefile index dfbac4da0..99cbb7514 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ DOCS_DEPS := $(VENV)/.docs.dependencies .PHONY: all build install test release bench fmt lint vet test-int-all gen centos7 wheezy trusty alpine3 arch test-int32 centos7-32 wheezy-32 trusty-32 alpine3-32 arch-32 -all: test-short-all test-int-all dgoss-sha256 +all: test-short-all test-int-all dgoss-sha256 dcgoss-sha256 kgoss-sha256 test-short-all: fmt lint vet test @@ -136,6 +136,12 @@ arch: build dgoss-sha256: cd extras/dgoss/ && sha256sum dgoss > dgoss.sha256 +dcgoss-sha256: + cd extras/dcgoss/ && sha256sum dcgoss > dcgoss.sha256 + +kgoss-sha256: + cd extras/kgoss/ && sha256sum kgoss > kgoss.sha256 + $(PYTHON): $(info Creating virtualenv in $(VENV)) @python -m venv $(VENV) From e567fff7eafdbc206b726eb5b03e1b7bd34658c9 Mon Sep 17 00:00:00 2001 From: dklimpel <5740567+dklimpel@users.noreply.github.com> Date: Sat, 18 May 2024 19:41:17 +0200 Subject: [PATCH 2/4] some improvements --- .github/workflows/release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b9d680590..1ddc2325c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,6 +29,8 @@ jobs: - name: "Upload binary as artifact" uses: actions/upload-artifact@v4 with: + retention-days: 5 + if-no-files-found: error name: build path: | release/* @@ -45,7 +47,5 @@ jobs: - name: Attach to release uses: softprops/action-gh-release@v2 with: - files: | - release/* - extras/*/*goss - extras/*/*goss.sha256 + files: build/** + fail_on_unmatched_files: true From e3f59c9f90ea98c4a828dd3d11ec0424b023b676 Mon Sep 17 00:00:00 2001 From: dklimpel <5740567+dklimpel@users.noreply.github.com> Date: Sat, 13 Jul 2024 19:28:29 +0200 Subject: [PATCH 3/4] disable travis deploy --- .travis.yml | 56 ++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d1886919..8d6f824f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,31 +43,31 @@ script: after_script: - ./ci/after-build.sh -deploy: - provider: releases - api_key: - secure: ijNltjw/mIHIOx8vLZ6asUun3SbY7D+XZbs5NX8vcIv0jvOiwaaT1hqny7SQBHfGZzqHsYUSS/GYAYJdBqKFFfGmTZsl90hFT6D0RGdz9C71UVxNFX4wQ5KQ/WVvdMT2SrLymGvu9TvoU0VG8OWqWVdxSlUPf6qOTGAagrzg+Tbsbb6czeiG67mlBBL23XSlfMG1p45UxzvI41SZj2R3ElUb0hym1CrFaoC36PBGrb0x41TXzvd8J7cu6xDzgczYhnYQQZpS6f2YcqNV1z0f+P67EQqQiDWIIcK2jE/YG+RgM8cbpLMiMec8CDiwNCsejBA5EbVMlGJlODvBXT5NmMBeugueqfSHEfkl5qZTQG4AOAT7UsqbnM7r0NqzmaE5Lj90igvJK6rNsH1ZRe79WfSsTtuzlkkouHGvyoz0M8gnMSzpbbwoyIy+UT0hhPMoZvIpXfr43en5WkbkPKfop0p4Vjc8NGg0iD45q1JAvIVTtz/WvWTknM1P8e3u+TiDTaZkcJJmFaBqgaeLoWktOGfi54p9nhgQnSyBYt4PyvhWDQs7QFmX0BdKlqJCESvUOJTe1t6zJJsV7Gn/3sGCN7JUEwbnXTsCoMjjFFUvQdm0Ur7t7/2xU3kO+dyfqcdM/5SYFeppQcjHI0ckhI51mIoBTsJsGvaVwKKL1I4cyBU= - file: - - release/goss-darwin-amd64 - - release/goss-darwin-amd64.sha256 - - release/goss-darwin-arm64 - - release/goss-darwin-arm64.sha256 - - release/goss-linux-amd64 - - release/goss-linux-amd64.sha256 - - release/goss-linux-386 - - release/goss-linux-386.sha256 - - release/goss-linux-arm - - release/goss-linux-arm.sha256 - - release/goss-linux-arm64 - - release/goss-linux-arm64.sha256 - - release/goss-linux-s390x - - release/goss-linux-s390x.sha256 - - release/goss-windows-amd64.exe - - release/goss-windows-amd64.exe.sha256 - - extras/dgoss/dgoss - - extras/dgoss/dgoss.sha256 - skip_cleanup: true - on: - repo: goss-org/goss - tags: true - condition: $TRAVIS_OS_NAME = linux +# deploy: +# provider: releases +# api_key: +# secure: ijNltjw/mIHIOx8vLZ6asUun3SbY7D+XZbs5NX8vcIv0jvOiwaaT1hqny7SQBHfGZzqHsYUSS/GYAYJdBqKFFfGmTZsl90hFT6D0RGdz9C71UVxNFX4wQ5KQ/WVvdMT2SrLymGvu9TvoU0VG8OWqWVdxSlUPf6qOTGAagrzg+Tbsbb6czeiG67mlBBL23XSlfMG1p45UxzvI41SZj2R3ElUb0hym1CrFaoC36PBGrb0x41TXzvd8J7cu6xDzgczYhnYQQZpS6f2YcqNV1z0f+P67EQqQiDWIIcK2jE/YG+RgM8cbpLMiMec8CDiwNCsejBA5EbVMlGJlODvBXT5NmMBeugueqfSHEfkl5qZTQG4AOAT7UsqbnM7r0NqzmaE5Lj90igvJK6rNsH1ZRe79WfSsTtuzlkkouHGvyoz0M8gnMSzpbbwoyIy+UT0hhPMoZvIpXfr43en5WkbkPKfop0p4Vjc8NGg0iD45q1JAvIVTtz/WvWTknM1P8e3u+TiDTaZkcJJmFaBqgaeLoWktOGfi54p9nhgQnSyBYt4PyvhWDQs7QFmX0BdKlqJCESvUOJTe1t6zJJsV7Gn/3sGCN7JUEwbnXTsCoMjjFFUvQdm0Ur7t7/2xU3kO+dyfqcdM/5SYFeppQcjHI0ckhI51mIoBTsJsGvaVwKKL1I4cyBU= +# file: +# - release/goss-darwin-amd64 +# - release/goss-darwin-amd64.sha256 +# - release/goss-darwin-arm64 +# - release/goss-darwin-arm64.sha256 +# - release/goss-linux-amd64 +# - release/goss-linux-amd64.sha256 +# - release/goss-linux-386 +# - release/goss-linux-386.sha256 +# - release/goss-linux-arm +# - release/goss-linux-arm.sha256 +# - release/goss-linux-arm64 +# - release/goss-linux-arm64.sha256 +# - release/goss-linux-s390x +# - release/goss-linux-s390x.sha256 +# - release/goss-windows-amd64.exe +# - release/goss-windows-amd64.exe.sha256 +# - extras/dgoss/dgoss +# - extras/dgoss/dgoss.sha256 +# skip_cleanup: true +# on: +# repo: goss-org/goss +# tags: true +# condition: $TRAVIS_OS_NAME = linux From 1b2ac63fe49fd0aac4a32f504fea8be579be66b6 Mon Sep 17 00:00:00 2001 From: dklimpel <5740567+dklimpel@users.noreply.github.com> Date: Sun, 14 Jul 2024 00:10:16 +0200 Subject: [PATCH 4/4] fix line endings --- .github/workflows/release.yaml | 102 ++++++++++++++++----------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1ddc2325c..98e96535a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,51 +1,51 @@ -name: "Build release artifacts" -on: - push: - tags: - - "v*" - workflow_dispatch: - -permissions: - contents: write - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - - name: Get version from tag - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - run: echo "TRAVIS_TAG=${{ github.ref_name }}" >> $GITHUB_ENV - - - run: make release - - run: make dgoss-sha256 dcgoss-sha256 kgoss-sha256 - - - name: "Upload binary as artifact" - uses: actions/upload-artifact@v4 - with: - retention-days: 5 - if-no-files-found: error - name: build - path: | - release/* - extras/*/*goss - extras/*/*goss.sha256 - - attach-assets: - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - needs: ["build"] - runs-on: ubuntu-latest - steps: - - name: Fetch all binaries - uses: actions/download-artifact@v4 - - name: Attach to release - uses: softprops/action-gh-release@v2 - with: - files: build/** - fail_on_unmatched_files: true +name: "Build release artifacts" +on: + push: + tags: + - "v*" + workflow_dispatch: + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Get version from tag + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + run: echo "TRAVIS_TAG=${{ github.ref_name }}" >> $GITHUB_ENV + + - run: make release + - run: make dgoss-sha256 dcgoss-sha256 kgoss-sha256 + + - name: "Upload binary as artifact" + uses: actions/upload-artifact@v4 + with: + retention-days: 5 + if-no-files-found: error + name: build + path: | + release/* + extras/*/*goss + extras/*/*goss.sha256 + + attach-assets: + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + needs: ["build"] + runs-on: ubuntu-latest + steps: + - name: Fetch all binaries + uses: actions/download-artifact@v4 + - name: Attach to release + uses: softprops/action-gh-release@v2 + with: + files: build/** + fail_on_unmatched_files: true