diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1868f133..7dd5f17c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,7 +93,7 @@ jobs: needs: build runs-on: ubuntu-latest permissions: {} - if: "! needs.build.outputs.self_mutation_happened" + if: ${{ !needs.build.outputs.self_mutation_happened }} steps: - uses: actions/setup-node@v4 with: @@ -106,19 +106,27 @@ jobs: - name: Restore build artifact permissions run: cd dist && setfacl --restore=permissions-backup.acl continue-on-error: true - - name: Prepare Repository - run: mv dist .repo + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + path: .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile + - name: Extract build artifact + run: tar --strip-components=1 -xzvf dist/js/*.tgz -C .repo + - name: Move build artifact out of the way + run: mv dist dist.old - name: Create js artifact run: cd .repo && npx projen package:js - - name: Collect js Artifact + - name: Collect js artifact run: mv .repo/dist dist package-java: needs: build runs-on: ubuntu-latest permissions: {} - if: "! needs.build.outputs.self_mutation_happened" + if: ${{ !needs.build.outputs.self_mutation_happened }} steps: - uses: actions/setup-java@v4 with: @@ -135,19 +143,27 @@ jobs: - name: Restore build artifact permissions run: cd dist && setfacl --restore=permissions-backup.acl continue-on-error: true - - name: Prepare Repository - run: mv dist .repo + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + path: .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile + - name: Extract build artifact + run: tar --strip-components=1 -xzvf dist/js/*.tgz -C .repo + - name: Move build artifact out of the way + run: mv dist dist.old - name: Create java artifact run: cd .repo && npx projen package:java - - name: Collect java Artifact + - name: Collect java artifact run: mv .repo/dist dist package-python: needs: build runs-on: ubuntu-latest permissions: {} - if: "! needs.build.outputs.self_mutation_happened" + if: ${{ !needs.build.outputs.self_mutation_happened }} steps: - uses: actions/setup-node@v4 with: @@ -163,19 +179,27 @@ jobs: - name: Restore build artifact permissions run: cd dist && setfacl --restore=permissions-backup.acl continue-on-error: true - - name: Prepare Repository - run: mv dist .repo + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + path: .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile + - name: Extract build artifact + run: tar --strip-components=1 -xzvf dist/js/*.tgz -C .repo + - name: Move build artifact out of the way + run: mv dist dist.old - name: Create python artifact run: cd .repo && npx projen package:python - - name: Collect python Artifact + - name: Collect python artifact run: mv .repo/dist dist package-dotnet: needs: build runs-on: ubuntu-latest permissions: {} - if: "! needs.build.outputs.self_mutation_happened" + if: ${{ !needs.build.outputs.self_mutation_happened }} steps: - uses: actions/setup-node@v4 with: @@ -191,19 +215,27 @@ jobs: - name: Restore build artifact permissions run: cd dist && setfacl --restore=permissions-backup.acl continue-on-error: true - - name: Prepare Repository - run: mv dist .repo + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + path: .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile + - name: Extract build artifact + run: tar --strip-components=1 -xzvf dist/js/*.tgz -C .repo + - name: Move build artifact out of the way + run: mv dist dist.old - name: Create dotnet artifact run: cd .repo && npx projen package:dotnet - - name: Collect dotnet Artifact + - name: Collect dotnet artifact run: mv .repo/dist dist package-go: needs: build runs-on: ubuntu-latest permissions: {} - if: "! needs.build.outputs.self_mutation_happened" + if: ${{ !needs.build.outputs.self_mutation_happened }} steps: - uses: actions/setup-node@v4 with: @@ -219,11 +251,19 @@ jobs: - name: Restore build artifact permissions run: cd dist && setfacl --restore=permissions-backup.acl continue-on-error: true - - name: Prepare Repository - run: mv dist .repo + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + path: .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile + - name: Extract build artifact + run: tar --strip-components=1 -xzvf dist/js/*.tgz -C .repo + - name: Move build artifact out of the way + run: mv dist dist.old - name: Create go artifact run: cd .repo && npx projen package:go - - name: Collect go Artifact + - name: Collect go artifact run: mv .repo/dist dist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05f60664..8de01f62 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: - name: Check if version has already been tagged id: check_tag_exists run: |- - TAG=$(cat dist/dist/releasetag.txt) + TAG=$(cat dist/releasetag.txt) ([ ! -z "$TAG" ] && git ls-remote -q --exit-code --tags origin $TAG && (echo "exists=true" >> $GITHUB_OUTPUT)) || (echo "exists=false" >> $GITHUB_OUTPUT) cat $GITHUB_OUTPUT - name: Check for new commits @@ -80,10 +80,6 @@ jobs: - name: Restore build artifact permissions run: cd dist && setfacl --restore=permissions-backup.acl continue-on-error: true - - name: Prepare Repository - run: mv dist .repo - - name: Collect GitHub Metadata - run: mv .repo/dist dist - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -110,13 +106,19 @@ jobs: - name: Restore build artifact permissions run: cd dist && setfacl --restore=permissions-backup.acl continue-on-error: true - - name: Prepare Repository - run: mv dist .repo + - name: Checkout + uses: actions/checkout@v4 + with: + path: .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile + - name: Extract build artifact + run: tar --strip-components=1 -xzvf dist/js/*.tgz -C .repo + - name: Move build artifact out of the way + run: mv dist dist.old - name: Create js artifact run: cd .repo && npx projen package:js - - name: Collect js Artifact + - name: Collect js artifact run: mv .repo/dist dist - name: Release env: @@ -148,13 +150,19 @@ jobs: - name: Restore build artifact permissions run: cd dist && setfacl --restore=permissions-backup.acl continue-on-error: true - - name: Prepare Repository - run: mv dist .repo + - name: Checkout + uses: actions/checkout@v4 + with: + path: .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile + - name: Extract build artifact + run: tar --strip-components=1 -xzvf dist/js/*.tgz -C .repo + - name: Move build artifact out of the way + run: mv dist dist.old - name: Create java artifact run: cd .repo && npx projen package:java - - name: Collect java Artifact + - name: Collect java artifact run: mv .repo/dist dist - name: Release env: @@ -187,13 +195,19 @@ jobs: - name: Restore build artifact permissions run: cd dist && setfacl --restore=permissions-backup.acl continue-on-error: true - - name: Prepare Repository - run: mv dist .repo + - name: Checkout + uses: actions/checkout@v4 + with: + path: .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile + - name: Extract build artifact + run: tar --strip-components=1 -xzvf dist/js/*.tgz -C .repo + - name: Move build artifact out of the way + run: mv dist dist.old - name: Create python artifact run: cd .repo && npx projen package:python - - name: Collect python Artifact + - name: Collect python artifact run: mv .repo/dist dist - name: Release env: @@ -222,13 +236,19 @@ jobs: - name: Restore build artifact permissions run: cd dist && setfacl --restore=permissions-backup.acl continue-on-error: true - - name: Prepare Repository - run: mv dist .repo + - name: Checkout + uses: actions/checkout@v4 + with: + path: .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile + - name: Extract build artifact + run: tar --strip-components=1 -xzvf dist/js/*.tgz -C .repo + - name: Move build artifact out of the way + run: mv dist dist.old - name: Create dotnet artifact run: cd .repo && npx projen package:dotnet - - name: Collect dotnet Artifact + - name: Collect dotnet artifact run: mv .repo/dist dist - name: Release env: @@ -256,13 +276,19 @@ jobs: - name: Restore build artifact permissions run: cd dist && setfacl --restore=permissions-backup.acl continue-on-error: true - - name: Prepare Repository - run: mv dist .repo + - name: Checkout + uses: actions/checkout@v4 + with: + path: .repo - name: Install Dependencies run: cd .repo && yarn install --check-files --frozen-lockfile + - name: Extract build artifact + run: tar --strip-components=1 -xzvf dist/js/*.tgz -C .repo + - name: Move build artifact out of the way + run: mv dist dist.old - name: Create go artifact run: cd .repo && npx projen package:go - - name: Collect go Artifact + - name: Collect go artifact run: mv .repo/dist dist - name: Release env: diff --git a/.projen/tasks.json b/.projen/tasks.json index 8cb5c74e..01481441 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -176,7 +176,7 @@ "description": "Creates the distribution package", "steps": [ { - "exec": "rsync -a . .repo --exclude .git --exclude node_modules && rm -rf dist && mv .repo dist", + "spawn": "package:js", "condition": "node -e \"if (!process.env.CI) process.exit(1)\"" }, { diff --git a/package.json b/package.json index a75d12c1..93dfc437 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "jsii-docgen": "^10.5.0", "jsii-pacmak": "^1.103.1", "jsii-rosetta": "^5.5.4", - "projen": "^0.86.9", + "projen": "^0.86.10", "ts-jest": "^27", "ts-node": "^10.9.2", "typescript": "^4.9.5" diff --git a/yarn.lock b/yarn.lock index 9d863046..90c10bb2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1468,9 +1468,9 @@ camelcase@^6.2.0, camelcase@^6.3.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001646: - version "1.0.30001655" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz#0ce881f5a19a2dcfda2ecd927df4d5c1684b982f" - integrity sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg== + version "1.0.30001657" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001657.tgz#29fd504bffca719d1c6b63a1f6f840be1973a660" + integrity sha512-DPbJAlP8/BAXy3IgiWmZKItubb3TYGP0WscQQlVGIfT4s/YlFYVuJgyOsQNP7rJRChx/qdMeLJQJP0Sgg2yjNA== case@1.6.3, case@^1.6.3: version "1.6.3" @@ -2087,9 +2087,9 @@ downlevel-dts@^0.11.0: typescript next electron-to-chromium@^1.5.4: - version "1.5.13" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz#1abf0410c5344b2b829b7247e031f02810d442e6" - integrity sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q== + version "1.5.15" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.15.tgz#3c969a29b03682db7a3032283ec8be6e75effe50" + integrity sha512-Z4rIDoImwEJW+YYKnPul4DzqsWVqYetYVN3XqDmRpgV0mjz0hYTaeeh+8/9CL1bk3AHYmF4freW/NTiVoXA2gA== emittery@^0.8.1: version "0.8.1" @@ -2273,9 +2273,9 @@ eslint-import-resolver-typescript@^2.7.1: tsconfig-paths "^3.14.1" eslint-module-utils@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.9.0.tgz#95d4ac038a68cd3f63482659dffe0883900eb342" - integrity sha512-McVbYmwA3NEKwRQY5g4aWMdcZE5xZxV8i8l7CqJSrameuGSQJtSWaL/LxTEzSKKaCcOhlpDR8XEfYXWPrdo/ZQ== + version "2.10.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.10.0.tgz#27fa5a565b2836bf4d666e89c27918fa652d0f3f" + integrity sha512-/AXiipjFyfLIUj3E4FR5NEGWoGDZHDfcGzWZkwobRc8fwqUAcy9owTk2LIKwNmtYL8Ad9/XfjSXbGHZ9AJWDEg== dependencies: debug "^3.2.7" @@ -4601,10 +4601,10 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -projen@^0.86.9: - version "0.86.9" - resolved "https://registry.yarnpkg.com/projen/-/projen-0.86.9.tgz#71c0524fb4abde95b3610103483928a348680371" - integrity sha512-6hfEyTWMOnVLfo7YdE9362j8eZP+or7asekr2qh6hpZ5oAO56YZ7xjZ2bOIJqtU6g7dGM06AZoeJczad7ml44A== +projen@^0.86.10: + version "0.86.10" + resolved "https://registry.yarnpkg.com/projen/-/projen-0.86.10.tgz#112bb234b703a00a29f12a5054b3b369ccb775f3" + integrity sha512-bv4PkT1rRe/WctV7kd71yTPri8at4AzIByWh5iBfvJbriqAuUTxc17DxrFBBlsIuiL0oJ4c98fRBbQgD2q5xtg== dependencies: "@iarna/toml" "^2.2.5" case "^1.6.3"