From 481f7d7355b8cd32b6836841111802f3de82f9e7 Mon Sep 17 00:00:00 2001 From: Jeff Roche <82384784+jeff-roche@users.noreply.github.com> Date: Thu, 2 Jun 2022 12:55:11 -0400 Subject: [PATCH 1/2] feat: Ci --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..54e173d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +# This is a basic workflow to help you get started with Actions + +name: release + +# Controls when the workflow will run +on: + # Triggers the workflow on push events but only for the main branch + push: + branches: + - 'main' + + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v3 + - + name: Install tools + run: bash ./scripts/install_deploy_tools.sh + - + name: Run goreleaser + run: bash ./scripts/deploy.sh + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 439f323b3626b3641992e42a551feca176a74bbf Mon Sep 17 00:00:00 2001 From: Jeff Roche Date: Thu, 2 Jun 2022 13:49:21 -0400 Subject: [PATCH 2/2] fix: build, test and updated secrets --- .github/workflows/release.yml | 4 +++- .github/workflows/test.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54e173d..560cd17 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,8 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 + with: + go-version: 1.18 - name: Install tools run: bash ./scripts/install_deploy_tools.sh @@ -30,4 +32,4 @@ jobs: name: Run goreleaser run: bash ./scripts/deploy.sh env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d4fa16a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +# This is a basic workflow to help you get started with Actions + +name: release + +# Controls when the workflow will run +on: + # Triggers the workflow on push events but only for the main branch + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.18 + - + name: Build + run: go build -v ./... + - + name: Test + run: go test -v ./...