diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml deleted file mode 100644 index 0c17f38..0000000 --- a/.github/workflows/check-dist.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: CI-check-no-dist-update - -# Prohibit any change to 'dist/**' on a non-release branch -on: - workflow_dispatch: - pull_request: - paths: - - 'dist/**' - -permissions: - contents: read - -jobs: - fail-on-dist-update: - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - with: - fetch-depth: 0 - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0 - with: - files: | - dist/** - - - name: Print changes to dist directory - env: - ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} - run: | - for file in ${ALL_CHANGED_FILES}; do - echo "$file was changed" - done - - - run: | - echo "The 'dist' directory is automatically updated by the release process." - echo "It should not be updated manually in a non-release branch or a pull request." - exit 1 diff --git a/.github/workflows/ci-update-dist.yml b/.github/workflows/ci-update-dist.yml index be065ca..a8f5b93 100644 --- a/.github/workflows/ci-update-dist.yml +++ b/.github/workflows/ci-update-dist.yml @@ -30,22 +30,15 @@ jobs: with: node-version: 20 cache: npm - cache-dependency-path: sources/package-lock.json - name: Install npm dependencies run: | npm clean-install - working-directory: sources - name: Build distribution run: | npm run build npm run package - working-directory: sources - - - name: Copy the generated sources/dist directory to the top-level dist - run: | - cp -r sources/dist . # Commit and push changes; has no effect if the files did not change # Important: The push event will not trigger any other workflows, see