diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..560cd17 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +# 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 + with: + go-version: 1.18 + - + name: Install tools + run: bash ./scripts/install_deploy_tools.sh + - + name: Run goreleaser + run: bash ./scripts/deploy.sh + env: + 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 ./...