diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d6c32a..d3f7276 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,11 @@ jobs: fetch-depth: 0 persist-credentials: false + - name: Set up Go 1.17 + uses: actions/setup-go@v2 + with: + go-version: ^1.17 + - name: Setup Node.js uses: actions/setup-node@v1 with: @@ -23,4 +28,6 @@ jobs: - name: Release env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - run: npx semantic-release -b main -p "@semantic-release/commit-analyzer" -p "@semantic-release/release-notes-generator" -p "@semantic-release/github" \ No newline at end of file + run: | + npm i -G semantic-release @semantic-release/exec + npx semantic-release -b main \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f2be559 --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +PLATFORMS := linux/amd64 linux/arm64 linux/arm/v7 + +temp = $(subst /, ,$@) +os = $(word 1, $(temp)) +arch = $(word 2, $(temp)) +version = draft + +release: $(PLATFORMS) + +$(PLATFORMS): + GOOS=$(os) GOARCH=$(arch) go build -o 'traefik-ondemand-service_$(version)_$(os)-$(arch)' . + +.PHONY: release $(PLATFORMS) \ No newline at end of file diff --git a/release.config.js b/release.config.js new file mode 100644 index 0000000..12dc904 --- /dev/null +++ b/release.config.js @@ -0,0 +1,15 @@ +module.exports = { + "branches": "main", + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + ["@semantic-release/exec", { + "publishCmd": "make version=${nextRelease.version} release -j 3" + }], + ["@semantic-release/github", { + "assets": [ + "traefik-ondemand-service*" + ] + }] + ] +} \ No newline at end of file