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 359b58f..f7b9bc9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -5,6 +5,8 @@ on: branches: [ master ] pull_request: branches: [ master ] + # This workflow is re-used in go-tag.yml + workflow_call: jobs: build: @@ -18,7 +20,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' 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 \