diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 916aa39..b55953e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,6 +13,7 @@ jobs: contents: write outputs: latest_commit: ${{ steps.git_remote.outputs.latest_commit }} + tag_exists: ${{ steps.check_tag_exists.outputs.exists }} env: CI: "true" steps: @@ -32,9 +33,17 @@ jobs: run: yarn install --check-files --frozen-lockfile - name: release run: npx projen release + - name: Check if version has already been tagged + id: check_tag_exists + run: |- + TAG=$(cat dist/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 id: git_remote - run: echo "latest_commit=$(git ls-remote origin -h ${{ github.ref }} | cut -f1)" >> $GITHUB_OUTPUT + run: |- + echo "latest_commit=$(git ls-remote origin -h ${{ github.ref }} | cut -f1)" >> $GITHUB_OUTPUT + cat $GITHUB_OUTPUT - name: Backup artifact permissions if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} run: cd dist && getfacl -R . > permissions-backup.acl @@ -51,7 +60,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - if: needs.release.outputs.latest_commit == github.sha + if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha steps: - uses: actions/setup-node@v3 with: @@ -80,7 +89,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - if: needs.release.outputs.latest_commit == github.sha + if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha steps: - uses: actions/setup-node@v3 with: @@ -113,7 +122,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - if: needs.release.outputs.latest_commit == github.sha + if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha steps: - uses: actions/setup-java@v3 with: @@ -153,7 +162,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - if: needs.release.outputs.latest_commit == github.sha + if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha steps: - uses: actions/setup-node@v3 with: @@ -188,7 +197,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - if: needs.release.outputs.latest_commit == github.sha + if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha steps: - uses: actions/setup-node@v3 with: @@ -222,7 +231,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - if: needs.release.outputs.latest_commit == github.sha + if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha steps: - uses: actions/setup-node@v3 with: diff --git a/.gitignore b/.gitignore index c911094..de2e869 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,6 @@ jspm_packages/ *.tgz .yarn-integrity .cache -!/.projenrc.js /test-reports/ junit.xml /coverage/ @@ -55,3 +54,4 @@ tsconfig.json !/.github/workflows/upgrade-cdklabs-projen-project-types-main.yml !/.github/workflows/upgrade-main.yml !/.github/workflows/upgrade-dev-deps-main.yml +!/.projenrc.ts diff --git a/.npmignore b/.npmignore index b0c7047..e61e18c 100644 --- a/.npmignore +++ b/.npmignore @@ -22,3 +22,5 @@ dist tsconfig.tsbuildinfo /.eslintrc.json !.jsii +/.gitattributes +/.projenrc.ts diff --git a/.projen/tasks.json b/.projen/tasks.json index d580c1b..221776e 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -127,7 +127,8 @@ "description": "Runs eslint against the codebase", "steps": [ { - "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test build-tools projenrc .projenrc.ts" + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ src test build-tools projenrc .projenrc.ts", + "receiveArgs": true } ] }, diff --git a/tsconfig.dev.json b/tsconfig.dev.json index 88cc2f2..da832d0 100644 --- a/tsconfig.dev.json +++ b/tsconfig.dev.json @@ -26,7 +26,6 @@ "target": "ES2019" }, "include": [ - ".projenrc.js", "src/**/*.ts", "test/**/*.ts", ".projenrc.ts", diff --git a/yarn.lock b/yarn.lock index 167b925..d361e69 100644 --- a/yarn.lock +++ b/yarn.lock @@ -38,14 +38,6 @@ "@aws-cdk/service-spec-types" "^0.0.36" "@cdklabs/tskb" "^0.0.3" -"@aws-cdk/cloud-assembly-schema@2.113.0": - version "2.113.0" - resolved "https://registry.yarnpkg.com/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-2.113.0.tgz#19749519aa1324c1e5e4a3b6b8a47173b373eb8d" - integrity sha512-mhyRJT+hYg2VQxC1jiNh/l0pYrkfTiux1y3jswHkt6oW1Eyu34lsDO1LTK931Z6JjRuK1PLIpz5COgshAwrqfA== - dependencies: - jsonschema "^1.4.1" - semver "^7.5.4" - "@aws-cdk/integ-runner@latest": version "2.116.1-alpha.0" resolved "https://registry.yarnpkg.com/@aws-cdk/integ-runner/-/integ-runner-2.116.1-alpha.0.tgz#ea9a612d0db858eacd0a3c4df9fa47edf8d7f572" @@ -1232,10 +1224,10 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== -aws-cdk-lib@2.113.0: - version "2.113.0" - resolved "https://registry.yarnpkg.com/aws-cdk-lib/-/aws-cdk-lib-2.113.0.tgz#dacc835f11c6df14bbe04746085f070bdde99eac" - integrity sha512-wZYooUd8nb3ADFtg1dSnsRt1MJmeqEK8cKOnPfCGCfm852YnVdb0qIEclURCQ4ygDJSuqiw9CE+xWVeTQTG6Dw== +aws-cdk-lib@2.108.0: + version "2.108.0" + resolved "https://registry.yarnpkg.com/aws-cdk-lib/-/aws-cdk-lib-2.108.0.tgz#8a7b289451cb8578dd191bc3028e771a555e34d2" + integrity sha512-6Qa/ovAEmGuBTQiKvXwXWk9nUn/cgLCsvObLCVaV8JzeEBDKfhedGeCrk4l+Pe5JCJrKwdv2/LzT/cKN1RyZ2g== dependencies: "@aws-cdk/asset-awscli-v1" "^2.2.201" "@aws-cdk/asset-kubectl-v20" "^2.1.2" @@ -1243,7 +1235,7 @@ aws-cdk-lib@2.113.0: "@balena/dockerignore" "^1.0.2" case "1.6.3" fs-extra "^11.1.1" - ignore "^5.3.0" + ignore "^5.2.4" jsonschema "^1.4.1" minimatch "^3.1.2" punycode "^2.3.1" @@ -1251,10 +1243,10 @@ aws-cdk-lib@2.113.0: table "^6.8.1" yaml "1.10.2" -aws-cdk@2.113.0: - version "2.113.0" - resolved "https://registry.yarnpkg.com/aws-cdk/-/aws-cdk-2.113.0.tgz#13a74953cc5ea42e1c7aa317a5b70428b71816ab" - integrity sha512-XEM8DSZpcMO1yXqozub8LiXK+3ihEqoWdeFDaIoMq0YmLspo9iAE3FPcKcIfv+ihRIEyvJLekGlxJPkx3+NOGA== +aws-cdk@2.108.0: + version "2.108.0" + resolved "https://registry.yarnpkg.com/aws-cdk/-/aws-cdk-2.108.0.tgz#ffd54892fe76c650d5ea90ef097f23f1867b7d32" + integrity sha512-qpBAtEGudaO7EVuGfur+lIpoh+JeWVgnvQ7z8MBtr7LEzolQf/9Cebovx/+KCUI3VnK/jsL/+3ixYwraaT/y2A== optionalDependencies: fsevents "2.3.2" @@ -2789,7 +2781,7 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.0: +ignore@^5.2.0, ignore@^5.2.4: version "5.3.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==