diff --git a/.github/workflows/nightly-build.yaml b/.github/workflows/nightly-build.yaml deleted file mode 100644 index 72049a62..00000000 --- a/.github/workflows/nightly-build.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: Nightly builds - -on: - workflow_dispatch: - push: - branches: - - main - -permissions: - contents: write -jobs: - nightly-build: - runs-on: macos-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version-file: 'go.mod' - - - name: Set up Gon - run: brew tap mitchellh/gon && brew install mitchellh/gon/gon - - - name: Import Apple Code Signing Certificates - uses: Apple-Actions/import-codesign-certs@v2 - with: - p12-file-base64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }} - p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 - env: - AC_PASSWORD: ${{ secrets.AC_PASSWORD }} - AC_USERNAME: ${{ secrets.AC_USERNAME }} - with: - version: latest - distribution: goreleaser - args: release --snapshot --skip=publish - - - name: Update Nightly Release - uses: andelf/nightly-release@46e2d5f80828ecc5c2c3c819eb31186a7cf2156c - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: next - name: 'Nightly Builds Download for KitOps CLI (kit)' - prerelease: true - body: | - Welcome to the cutting edge! Our nightly builds offer the most recent developments - in kit CLI, providing early access to new features, enhancements, and - fixes that are on their way to the next stable release' - files: | - ./dist/*.txt - ./dist/*.zip - ./dist/*.tar.gz diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 50e01252..51e5b323 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -15,7 +15,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.21.6 + go-version-file: 'go.mod' - name: Check go.mod run: | @@ -57,15 +57,6 @@ jobs: exit 1 fi - - name: Check CLI docs generation - run: | - docs/src/docs/cli/generate.sh > /dev/null - if [[ ! -z $(git status -s) ]]; then - echo "CLI documentation is out of date" - echo "Run docs/src/docs/cli/generate.sh and commit the result" - exit 1 - fi - - name: Check for trailing whitespace run: | files=$(grep -E -lI --exclude '*.svg' --exclude 'docs/*' " +$" $(git ls-files) || true) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b46d5796..db4d5cf0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -41,3 +41,14 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} AC_PASSWORD: ${{ secrets.AC_PASSWORD }} AC_USERNAME: ${{ secrets.AC_USERNAME }} + + - name: Generate CLI documentation + run: | + docs/src/docs/cli/generate.sh > /dev/null + + - name: PR for CLI documentation + uses: peter-evans/create-pull-request@v6 + with: + add-paths: | + docs/*.md + commit-message: "docs: update CLI documentation for ${{ github.ref_name }}" \ No newline at end of file