diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee6a670..8ed0b62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,62 +1,19 @@ -name: Continuous Integration Pipeline +name: CI on: - release: - types: - - published - # - released - # - created - - # workflow_dispatch: - push: + pull_request: branches: [ main ] - # tags: - # - 'v[0-9]+.[0-9]+.[0-9]+' - - # pull_request: - # branches: [ main ] - -env: - GO_VERSION: '1.24' - MAIN_FILE: './cmd/server/hostinfo.go' + push: + branches-ignore: [ main ] jobs: - - Verification: - # if: github.ref_name != 'main' - name: Verification of all checks + verification: runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go ${{ env.GO_VERSION }} - uses: actions/setup-go@v5 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: ${{ env.GO_VERSION }} - - - name: Run Lint - run: | - echo "Running lint..." - fmt_out=$(gofmt -l .) - if [ -n "$fmt_out" ]; then - echo "Go code is not formatted:" - echo "$fmt_out" - gofmt -d . - exit 1 - fi - go vet ./... - - semantic-release: - if: > - github.event_name == 'push' && github.ref == 'refs/heads/main' - permissions: - contents: write # to be able to publish a GitHub release - uses: ./.github/workflows/template-semantic-release.yml - with: - dry_run: false - semantic_version: 20 - secrets: - MY_GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} - \ No newline at end of file + go-version: '1.24' + - run: | + gofmt -l . + go vet ./... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c691a6e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,17 @@ +name: Release + +on: + push: + branches: [ main ] + +permissions: + contents: write + +jobs: + semantic-release: + uses: ./.github/workflows/template-semantic-release.yml + with: + dry_run: false + semantic_version: 20 + secrets: + MY_GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/README.md b/README.md index 466b0b4..0c6a242 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # testApp_sourcecode test aa +aa