diff --git a/.github/workflows/release-k8s.26.yml b/.github/workflows/release-k8s.26.yml index e9298c1bf..cbb32d2ce 100644 --- a/.github/workflows/release-k8s.26.yml +++ b/.github/workflows/release-k8s.26.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:k8s-26/main run: npx projen release:k8s-26/main + - 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: @@ -152,7 +161,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: @@ -187,7 +196,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: @@ -221,7 +230,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/package.json b/package.json index 716c43383..f34f00380 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "jsii-docgen": "^3.8.31", "jsii-pacmak": "^1.94.0", "jsii-rosetta": "1.x", - "projen": "^0.79.1", + "projen": "^0.79.2", "snake-case": "^3.0.4", "standard-version": "^9", "ts-jest": "^27", diff --git a/yarn.lock b/yarn.lock index 1ad4ec599..c5fb99b26 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4774,10 +4774,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.79.1: - version "0.79.1" - resolved "https://registry.yarnpkg.com/projen/-/projen-0.79.1.tgz#bff39a8378675dc92d7a880f8f57595b52f51bcd" - integrity sha512-BkkCdGXZ+1pCN6hUZadxclweDfFkH6k1uAUpoY+B4awDDCtQQ7A9/Is6zyc89Jt38xDg7Ctc+/1Z86WwjOIENA== +projen@^0.79.2: + version "0.79.2" + resolved "https://registry.yarnpkg.com/projen/-/projen-0.79.2.tgz#ac1d51a07ad3fcb503ca712055b430042ccab853" + integrity sha512-ZKO2GDsJyU+MfsQAcvpMKPrWcuS2rPPCpqf2biZ7rcBVdYnDiOn03G1Gm9G/wRereMdDTciL6DYqsxTF4UvfqA== dependencies: "@iarna/toml" "^2.2.5" case "^1.6.3"