diff --git a/.github/workflows/checking-dependencies.yml b/.github/workflows/checking-dependencies.yml new file mode 100644 index 00000000..2364a9c4 --- /dev/null +++ b/.github/workflows/checking-dependencies.yml @@ -0,0 +1,29 @@ +name: Checking Dependencies + +on: + workflow_dispatch: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + dist-deps-prune: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v6 + with: + node-version: 24.13.0 + cache: pnpm + + - run: pnpm install --frozen-lockfile + - run: pnpm -C packages/app build + + - name: Dist deps prune (lint) + run: | + pnpm dlx @prover-coder-ai/dist-deps-prune scan \ + --package ./packages/app/package.json \ + --prune-dev true \ + --silent diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0443f63c..ec33349e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,31 +1,32 @@ name: Release on: - push: + workflow_run: + workflows: ["Check"] branches: [main] + types: [completed] -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - -permissions: {} +permissions: + contents: write + actions: write + id-token: write + pull-requests: write + packages: write jobs: release: - name: Release + if: github.event.workflow_run.conclusion == 'success' runs-on: ubuntu-latest - timeout-minutes: 10 - permissions: - contents: write - id-token: write - pull-requests: write steps: - - uses: actions/checkout@v6 - - name: Install dependencies - uses: ./.github/actions/setup - - name: Create Release Pull Request or Publish - uses: changesets/action@v1 + - uses: ProverCoderAI/action-release@v1.0.17 with: - version: pnpm changeset-version - publish: pnpm changeset-publish - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} + npm_token: ${{ secrets.NPM_TOKEN }} + ref: ${{ github.event.workflow_run.head_sha }} + branch: ${{ github.event.workflow_run.head_branch }} + package_json_path: packages/app/package.json + pnpm_filter: ./packages/app + bump_type: patch + publish_npm: true + publish_github_packages: true + skip_if_unchanged: true + cancel_on_no_changes: true diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index ff7373ed..13c7a6d8 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -11,15 +11,45 @@ permissions: jobs: snapshot: name: Snapshot - if: github.repository_owner == 'skulidropek' + if: github.repository_owner == 'ProverCoderAI' runs-on: ubuntu-latest timeout-minutes: 10 steps: - uses: actions/checkout@v6 - name: Install dependencies uses: ./.github/actions/setup + with: + node-version: 22.12.0 - name: Build package run: pnpm build - name: Create snapshot id: snapshot - run: pnpx pkg-pr-new@0.0.24 publish --pnpm --comment=off + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + working-directory: packages/app + run: | + set +e + pnpx pkg-pr-new@0.0.24 publish --pnpm --comment=off + STATUS=$? + if [ $STATUS -eq 0 ]; then + echo "success=true" >> "$GITHUB_OUTPUT" + else + echo "success=false" >> "$GITHUB_OUTPUT" + echo "pkg-pr-new failed (likely app not installed); falling back to artifacts." + fi + exit 0 + - name: Fallback snapshot artifacts + if: steps.snapshot.outputs.success != 'true' + shell: bash + run: | + set -euo pipefail + mkdir -p artifacts + cd packages/app + npm pack --silent --pack-destination ../../artifacts + - name: Upload snapshot artifacts + if: steps.snapshot.outputs.success != 'true' + uses: actions/upload-artifact@v6 + with: + name: context-doc-snapshot + path: artifacts/*.tgz