Skip to content

Commit

Permalink
chore: release flow added
Browse files Browse the repository at this point in the history
  • Loading branch information
erayarslan committed Nov 24, 2024
1 parent 52a625b commit a8fb885
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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/*
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -42,7 +42,6 @@ jobs:
- name: Run
run: make test

- uses: actions/checkout@v3
- name: Delete Multipass
if: always()
run: |
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
./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

0 comments on commit a8fb885

Please sign in to comment.