From a9c4d37d93fbeba021c38bfcd5365771473fc4da Mon Sep 17 00:00:00 2001 From: shinebayar-g <3091558+shinebayar-g@users.noreply.github.com> Date: Tue, 7 Sep 2021 09:53:13 -0400 Subject: [PATCH] ci: add release workflow --- .github/workflows/{go.yml => ci.yml} | 5 +++-- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) rename .github/workflows/{go.yml => ci.yml} (99%) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/go.yml b/.github/workflows/ci.yml similarity index 99% rename from .github/workflows/go.yml rename to .github/workflows/ci.yml index ffd8466..8d91696 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,6 @@ -'on': +name: build + +on: push: branches: - main @@ -6,7 +8,6 @@ branches: - main -name: build jobs: build: strategy: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..38c3828 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: release + +on: + push: + tags: + - 'v*.*.*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: 1.17.x + - name: Checkout code + uses: actions/checkout@v2 + - name: Verification + run: go mod verify + - name: Build + run: go build -o ufw-docker-automated github.com/shinebayar-g/ufw-docker-automated + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: ufw-docker-automated