From 9eeef22900af9c1252a826ba640a134b39d1ca48 Mon Sep 17 00:00:00 2001 From: mirkobrombin Date: Fri, 5 May 2023 08:00:46 +0200 Subject: [PATCH] add github actions --- .github/workflows/build.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0968d92 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +name: Build + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.19 + + - name: Build + run: sudo go build -v ./... -o vib + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + with: + name: vib + path: vib \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..742972d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.19 + + - name: Build + run: sudo go build -v ./... -o vib + + - name: Upload a Release Asset + uses: softprops/action-gh-release@v1 + with: + files: vib