From a8f69bb050c0ed15af0a5c9bf16979a186e05a0b Mon Sep 17 00:00:00 2001 From: Jacek Kowalski Date: Wed, 30 Oct 2024 00:13:41 +0100 Subject: [PATCH 1/4] Packaging: remove --package option when generating RPM Otherwise resulting RPM includes all the artifacts in /dist --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index ad40081..cb3ab35 100644 --- a/Makefile +++ b/Makefile @@ -90,7 +90,6 @@ package-rpm-stayrtr: prepare --url "$(URL)" \ --architecture $(ARCH) \ --license "$(LICENSE) "\ - --package $(DIST_DIR) \ $(OUTPUT_STAYRTR)=/usr/bin/stayrtr \ package/.keep=/usr/share/stayrtr/.keep \ package/stayrtr.service=/lib/systemd/system/stayrtr.service \ From 9a77fc3c314d43b75261a88cfa3a85b85d4b89d4 Mon Sep 17 00:00:00 2001 From: Jacek Kowalski Date: Tue, 29 Oct 2024 23:53:09 +0100 Subject: [PATCH 2/4] Workflows: upgrade setup-go action to v5 due to deprecation --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 359b58f..232942d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -18,7 +18,7 @@ jobs: fetch-depth: '0' - name: Set up go version from go.mod - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version-file: 'go.mod' From 52cd5b062c1a6bf2993db38b7974a5de838f9772 Mon Sep 17 00:00:00 2001 From: Jacek Kowalski Date: Tue, 29 Oct 2024 23:46:12 +0100 Subject: [PATCH 3/4] Workflows: automatically create GitHub release with all the artifacts --- .github/workflows/go-tag.yml | 26 ++++++++++++++++++++++++++ .github/workflows/go.yml | 1 + 2 files changed, 27 insertions(+) create mode 100644 .github/workflows/go-tag.yml diff --git a/.github/workflows/go-tag.yml b/.github/workflows/go-tag.yml new file mode 100644 index 0000000..92ff05c --- /dev/null +++ b/.github/workflows/go-tag.yml @@ -0,0 +1,26 @@ +name: Tagged Go build + +on: + push: + tags: + - 'v*' + +jobs: + go: + name: Go + uses: ./.github/workflows/go.yml + + release: + name: Release + runs-on: ubuntu-latest + needs: [go] + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + + - name: Create release + uses: softprops/action-gh-release@v2 + with: + files: dist/* + fail_on_unmatched_files: true + generate_release_notes: true diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 232942d..5b3c964 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -5,6 +5,7 @@ on: branches: [ master ] pull_request: branches: [ master ] + workflow_call: jobs: build: From 4ca0110f70ff3be195d6141933e21bcb23bbc922 Mon Sep 17 00:00:00 2001 From: Jacek Kowalski Date: Wed, 30 Oct 2024 08:47:22 +0100 Subject: [PATCH 4/4] Workflows: add extra information before on.workflow_call element --- .github/workflows/go.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 5b3c964..f7b9bc9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -5,6 +5,7 @@ on: branches: [ master ] pull_request: branches: [ master ] + # This workflow is re-used in go-tag.yml workflow_call: jobs: