diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..80c8e1d --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,43 @@ +# GitHub Actions workflow for go-tetris +name: Go + +on: + push: + branches: + - "master" + - "feature/**" + - "fix/**" + pull_request: + branches: + - "master" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.24.1' # Updated to Go 1.24.1 + + - name: Verify go.mod and go.sum + run: go mod tidy && git diff --exit-code go.mod go.sum + + - name: Run Linter + uses: golangci/golangci-lint-action@v3 + with: + version: latest + + - name: Build + run: go build -v ./... + + deploy: + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to Production + run: echo "Deploying application..."