diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 82eb0b2..ec597c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: fetch-depth: 1 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: '1.23' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e7bc778 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.23' + + - name: Install dependencies and Build + run: go mod tidy && make release + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload assets + uses: actions/upload-artifact@v4 + with: + name: multiverse + path: bin/* \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 47b001d..bc76a38 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ jobs: fetch-depth: 1 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: '1.23' @@ -42,7 +42,6 @@ jobs: - name: Run run: make test - - uses: actions/checkout@v3 - name: Delete Multipass if: always() run: | diff --git a/Makefile b/Makefile index d00779a..79392a2 100644 --- a/Makefile +++ b/Makefile @@ -38,4 +38,7 @@ build: go build cmd/main.go test: - ./main -master -worker & echo $$! > pid && sleep 10 && ./main -client -nodes && ./main -client -instances && kill `cat pid` && rm pid \ No newline at end of file + ./main -master -worker & echo $$! > pid && sleep 10 && ./main -client -nodes && ./main -client -instances && kill `cat pid` && rm pid + +release: + go build -o ./bin/multiverse cmd/main.go \ No newline at end of file