release #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". | |
name: release | |
on: | |
workflow_dispatch: {} | |
jobs: | |
release: | |
runs-on: aws-cdk_ubuntu-latest_4-core | |
permissions: | |
contents: write | |
outputs: | |
latest_commit: ${{ steps.git_remote.outputs.latest_commit }} | |
publish-aws-cdk-cloud-assembly-schema: ${{ steps.check-publish-aws-cdk-cloud-assembly-schema.outputs.publish }} | |
publish-aws-cdk-cloudformation-diff: ${{ steps.check-publish-aws-cdk-cloudformation-diff.outputs.publish }} | |
publish-cdk-assets: ${{ steps.check-publish-cdk-assets.outputs.publish }} | |
publish-aws-cdk: ${{ steps.check-publish-aws-cdk.outputs.publish }} | |
publish-aws-cdk-cli-lib-alpha: ${{ steps.check-publish-aws-cdk-cli-lib-alpha.outputs.publish }} | |
publish-cdk: ${{ steps.check-publish-cdk.outputs.publish }} | |
env: | |
CI: "true" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set git identity | |
run: |- | |
git config user.name "github-actions" | |
git config user.email "github-actions@github.com" | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install dependencies | |
run: yarn install --check-files --frozen-lockfile | |
- name: release | |
run: npx projen release | |
- id: check-publish-aws-cdk-cloud-assembly-schema | |
run: (git ls-remote -q --exit-code --tags origin $(cat dist/releasetag.txt) && (echo "publish=false" >> $GITHUB_OUTPUT)) || echo "publish=true" >> $GITHUB_OUTPUT | |
working-directory: packages/@aws-cdk/cloud-assembly-schema | |
- id: check-publish-aws-cdk-cloudformation-diff | |
run: (git ls-remote -q --exit-code --tags origin $(cat dist/releasetag.txt) && (echo "publish=false" >> $GITHUB_OUTPUT)) || echo "publish=true" >> $GITHUB_OUTPUT | |
working-directory: packages/@aws-cdk/cloudformation-diff | |
- id: check-publish-cdk-assets | |
run: (git ls-remote -q --exit-code --tags origin $(cat dist/releasetag.txt) && (echo "publish=false" >> $GITHUB_OUTPUT)) || echo "publish=true" >> $GITHUB_OUTPUT | |
working-directory: packages/cdk-assets | |
- id: check-publish-aws-cdk | |
run: (git ls-remote -q --exit-code --tags origin $(cat dist/releasetag.txt) && (echo "publish=false" >> $GITHUB_OUTPUT)) || echo "publish=true" >> $GITHUB_OUTPUT | |
working-directory: packages/aws-cdk | |
- id: check-publish-aws-cdk-cli-lib-alpha | |
run: (git ls-remote -q --exit-code --tags origin $(cat dist/releasetag.txt) && (echo "publish=false" >> $GITHUB_OUTPUT)) || echo "publish=true" >> $GITHUB_OUTPUT | |
working-directory: packages/@aws-cdk/cli-lib-alpha | |
- id: check-publish-cdk | |
run: (git ls-remote -q --exit-code --tags origin $(cat dist/releasetag.txt) && (echo "publish=false" >> $GITHUB_OUTPUT)) || echo "publish=true" >> $GITHUB_OUTPUT | |
working-directory: packages/cdk | |
- name: Output the sha value that downstream checks expect | |
id: git_remote | |
run: echo "latest_commit=${{ github.sha }}" >> $GITHUB_OUTPUT | |
- name: "@aws-cdk/cloud-assembly-schema: Backup artifact permissions" | |
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} | |
run: cd dist && getfacl -R . > permissions-backup.acl | |
continue-on-error: true | |
working-directory: packages/@aws-cdk/cloud-assembly-schema | |
- name: "@aws-cdk/cloud-assembly-schema: Upload artifact" | |
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} | |
uses: actions/upload-artifact@v4.4.0 | |
with: | |
name: aws-cdk-cloud-assembly-schema_build-artifact | |
path: packages/@aws-cdk/cloud-assembly-schema/dist | |
overwrite: true | |
- name: "@aws-cdk/cloudformation-diff: Backup artifact permissions" | |
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} | |
run: cd dist && getfacl -R . > permissions-backup.acl | |
continue-on-error: true | |
working-directory: packages/@aws-cdk/cloudformation-diff | |
- name: "@aws-cdk/cloudformation-diff: Upload artifact" | |
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} | |
uses: actions/upload-artifact@v4.4.0 | |
with: | |
name: aws-cdk-cloudformation-diff_build-artifact | |
path: packages/@aws-cdk/cloudformation-diff/dist | |
overwrite: true | |
- name: "cdk-assets: Backup artifact permissions" | |
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} | |
run: cd dist && getfacl -R . > permissions-backup.acl | |
continue-on-error: true | |
working-directory: packages/cdk-assets | |
- name: "cdk-assets: Upload artifact" | |
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} | |
uses: actions/upload-artifact@v4.4.0 | |
with: | |
name: cdk-assets_build-artifact | |
path: packages/cdk-assets/dist | |
overwrite: true | |
- name: "aws-cdk: Backup artifact permissions" | |
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} | |
run: cd dist && getfacl -R . > permissions-backup.acl | |
continue-on-error: true | |
working-directory: packages/aws-cdk | |
- name: "aws-cdk: Upload artifact" | |
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} | |
uses: actions/upload-artifact@v4.4.0 | |
with: | |
name: aws-cdk_build-artifact | |
path: packages/aws-cdk/dist | |
overwrite: true | |
- name: "@aws-cdk/cli-lib-alpha: Backup artifact permissions" | |
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} | |
run: cd dist && getfacl -R . > permissions-backup.acl | |
continue-on-error: true | |
working-directory: packages/@aws-cdk/cli-lib-alpha | |
- name: "@aws-cdk/cli-lib-alpha: Upload artifact" | |
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} | |
uses: actions/upload-artifact@v4.4.0 | |
with: | |
name: aws-cdk-cli-lib-alpha_build-artifact | |
path: packages/@aws-cdk/cli-lib-alpha/dist | |
overwrite: true | |
- name: "cdk: Backup artifact permissions" | |
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} | |
run: cd dist && getfacl -R . > permissions-backup.acl | |
continue-on-error: true | |
working-directory: packages/cdk | |
- name: "cdk: Upload artifact" | |
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} | |
uses: actions/upload-artifact@v4.4.0 | |
with: | |
name: cdk_build-artifact | |
path: packages/cdk/dist | |
overwrite: true | |
aws-cdk-cloud-assembly-schema_release_github: | |
name: "@aws-cdk/cloud-assembly-schema: Publish to GitHub Releases" | |
needs: | |
- release | |
- aws-cdk-cloud-assembly-schema_release_npm | |
- aws-cdk-cloud-assembly-schema_release_maven | |
- aws-cdk-cloud-assembly-schema_release_pypi | |
- aws-cdk-cloud-assembly-schema_release_nuget | |
- aws-cdk-cloud-assembly-schema_release_golang | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cloud-assembly-schema == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk-cloud-assembly-schema_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
GITHUB_REF: ${{ github.sha }} | |
run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi | |
aws-cdk-cloud-assembly-schema_release_npm: | |
name: "@aws-cdk/cloud-assembly-schema: Publish to npm" | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cloud-assembly-schema == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk-cloud-assembly-schema_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- 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/packages/@aws-cdk/cloud-assembly-schema | |
- name: Move build artifact out of the way | |
run: mv dist dist.old | |
- name: Create js artifact | |
run: cd .repo/packages/@aws-cdk/cloud-assembly-schema && npx projen package:js | |
- name: Collect js artifact | |
run: mv .repo/packages/@aws-cdk/cloud-assembly-schema/dist dist | |
- name: Release | |
env: | |
NPM_DIST_TAG: latest | |
NPM_REGISTRY: registry.npmjs.org | |
NPM_CONFIG_PROVENANCE: "true" | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx -p publib@latest publib-npm | |
aws-cdk-cloud-assembly-schema_release_maven: | |
name: "@aws-cdk/cloud-assembly-schema: Publish to Maven Central" | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cloud-assembly-schema == 'true' }} | |
steps: | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: corretto | |
java-version: "11" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk-cloud-assembly-schema_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- 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/packages/@aws-cdk/cloud-assembly-schema | |
- name: Move build artifact out of the way | |
run: mv dist dist.old | |
- name: Create java artifact | |
run: cd .repo/packages/@aws-cdk/cloud-assembly-schema && npx projen package:java | |
- name: Collect java artifact | |
run: mv .repo/packages/@aws-cdk/cloud-assembly-schema/dist dist | |
- name: Release | |
env: | |
MAVEN_ENDPOINT: https://aws.oss.sonatype.org | |
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
MAVEN_GPG_PRIVATE_KEY_PASSPHRASE: ${{ secrets.MAVEN_GPG_PRIVATE_KEY_PASSPHRASE }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_STAGING_PROFILE_ID: ${{ secrets.MAVEN_STAGING_PROFILE_ID }} | |
run: npx -p publib@latest publib-maven | |
aws-cdk-cloud-assembly-schema_release_pypi: | |
name: "@aws-cdk/cloud-assembly-schema: Publish to PyPI" | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cloud-assembly-schema == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk-cloud-assembly-schema_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- 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/packages/@aws-cdk/cloud-assembly-schema | |
- name: Move build artifact out of the way | |
run: mv dist dist.old | |
- name: Create python artifact | |
run: cd .repo/packages/@aws-cdk/cloud-assembly-schema && npx projen package:python | |
- name: Collect python artifact | |
run: mv .repo/packages/@aws-cdk/cloud-assembly-schema/dist dist | |
- name: Release | |
env: | |
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | |
run: npx -p publib@latest publib-pypi | |
aws-cdk-cloud-assembly-schema_release_nuget: | |
name: "@aws-cdk/cloud-assembly-schema: Publish to NuGet Gallery" | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cloud-assembly-schema == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.x | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk-cloud-assembly-schema_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- 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/packages/@aws-cdk/cloud-assembly-schema | |
- name: Move build artifact out of the way | |
run: mv dist dist.old | |
- name: Create dotnet artifact | |
run: cd .repo/packages/@aws-cdk/cloud-assembly-schema && npx projen package:dotnet | |
- name: Collect dotnet artifact | |
run: mv .repo/packages/@aws-cdk/cloud-assembly-schema/dist dist | |
- name: Release | |
env: | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
run: npx -p publib@latest publib-nuget | |
aws-cdk-cloud-assembly-schema_release_golang: | |
name: "@aws-cdk/cloud-assembly-schema: Publish to GitHub Go Module Repository" | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cloud-assembly-schema == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.18.0 | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk-cloud-assembly-schema_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- 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/packages/@aws-cdk/cloud-assembly-schema | |
- name: Move build artifact out of the way | |
run: mv dist dist.old | |
- name: Create go artifact | |
run: cd .repo/packages/@aws-cdk/cloud-assembly-schema && npx projen package:go | |
- name: Collect go artifact | |
run: mv .repo/packages/@aws-cdk/cloud-assembly-schema/dist dist | |
- name: Release | |
env: | |
GIT_USER_NAME: github-actions | |
GIT_USER_EMAIL: github-actions@github.com | |
GITHUB_TOKEN: ${{ secrets.GO_GITHUB_TOKEN }} | |
run: npx -p publib@latest publib-golang | |
aws-cdk-cloudformation-diff_release_github: | |
name: "@aws-cdk/cloudformation-diff: Publish to GitHub Releases" | |
needs: | |
- release | |
- aws-cdk-cloudformation-diff_release_npm | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cloudformation-diff == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk-cloudformation-diff_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
GITHUB_REF: ${{ github.sha }} | |
run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi | |
aws-cdk-cloudformation-diff_release_npm: | |
name: "@aws-cdk/cloudformation-diff: Publish to npm" | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cloudformation-diff == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk-cloudformation-diff_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Release | |
env: | |
NPM_DIST_TAG: latest | |
NPM_REGISTRY: registry.npmjs.org | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx -p publib@latest publib-npm | |
cdk-assets_release_github: | |
name: "cdk-assets: Publish to GitHub Releases" | |
needs: | |
- release | |
- cdk-assets_release_npm | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-cdk-assets == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: cdk-assets_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
GITHUB_REF: ${{ github.sha }} | |
run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF -p 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi | |
cdk-assets_release_npm: | |
name: "cdk-assets: Publish to npm" | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-cdk-assets == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: cdk-assets_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Release | |
env: | |
NPM_DIST_TAG: v3-latest | |
NPM_REGISTRY: registry.npmjs.org | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx -p publib@latest publib-npm | |
aws-cdk_release_github: | |
name: "aws-cdk: Publish to GitHub Releases" | |
needs: | |
- release | |
- aws-cdk_release_npm | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
GITHUB_REF: ${{ github.sha }} | |
run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi | |
aws-cdk_release_npm: | |
name: "aws-cdk: Publish to npm" | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Release | |
env: | |
NPM_DIST_TAG: latest | |
NPM_REGISTRY: registry.npmjs.org | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx -p publib@latest publib-npm | |
aws-cdk-cli-lib-alpha_release_github: | |
name: "@aws-cdk/cli-lib-alpha: Publish to GitHub Releases" | |
needs: | |
- release | |
- aws-cdk-cli-lib-alpha_release_npm | |
- aws-cdk-cli-lib-alpha_release_maven | |
- aws-cdk-cli-lib-alpha_release_pypi | |
- aws-cdk-cli-lib-alpha_release_nuget | |
- aws-cdk-cli-lib-alpha_release_golang | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cli-lib-alpha == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk-cli-lib-alpha_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
GITHUB_REF: ${{ github.sha }} | |
run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi | |
aws-cdk-cli-lib-alpha_release_npm: | |
name: "@aws-cdk/cli-lib-alpha: Publish to npm" | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cli-lib-alpha == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk-cli-lib-alpha_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- 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/packages/@aws-cdk/cli-lib-alpha | |
- name: Move build artifact out of the way | |
run: mv dist dist.old | |
- name: Create js artifact | |
run: cd .repo/packages/@aws-cdk/cli-lib-alpha && npx projen package:js | |
- name: Collect js artifact | |
run: mv .repo/packages/@aws-cdk/cli-lib-alpha/dist dist | |
- name: Release | |
env: | |
NPM_DIST_TAG: latest | |
NPM_REGISTRY: registry.npmjs.org | |
NPM_CONFIG_PROVENANCE: "true" | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx -p publib@latest publib-npm | |
aws-cdk-cli-lib-alpha_release_maven: | |
name: "@aws-cdk/cli-lib-alpha: Publish to Maven Central" | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cli-lib-alpha == 'true' }} | |
steps: | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: corretto | |
java-version: "11" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk-cli-lib-alpha_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- 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/packages/@aws-cdk/cli-lib-alpha | |
- name: Move build artifact out of the way | |
run: mv dist dist.old | |
- name: Create java artifact | |
run: cd .repo/packages/@aws-cdk/cli-lib-alpha && npx projen package:java | |
- name: Collect java artifact | |
run: mv .repo/packages/@aws-cdk/cli-lib-alpha/dist dist | |
- name: Release | |
env: | |
MAVEN_ENDPOINT: https://aws.oss.sonatype.org | |
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
MAVEN_GPG_PRIVATE_KEY_PASSPHRASE: ${{ secrets.MAVEN_GPG_PRIVATE_KEY_PASSPHRASE }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
MAVEN_STAGING_PROFILE_ID: ${{ secrets.MAVEN_STAGING_PROFILE_ID }} | |
run: npx -p publib@latest publib-maven | |
aws-cdk-cli-lib-alpha_release_pypi: | |
name: "@aws-cdk/cli-lib-alpha: Publish to PyPI" | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cli-lib-alpha == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk-cli-lib-alpha_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- 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/packages/@aws-cdk/cli-lib-alpha | |
- name: Move build artifact out of the way | |
run: mv dist dist.old | |
- name: Create python artifact | |
run: cd .repo/packages/@aws-cdk/cli-lib-alpha && npx projen package:python | |
- name: Collect python artifact | |
run: mv .repo/packages/@aws-cdk/cli-lib-alpha/dist dist | |
- name: Release | |
env: | |
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | |
run: npx -p publib@latest publib-pypi | |
aws-cdk-cli-lib-alpha_release_nuget: | |
name: "@aws-cdk/cli-lib-alpha: Publish to NuGet Gallery" | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cli-lib-alpha == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.x | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk-cli-lib-alpha_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- 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/packages/@aws-cdk/cli-lib-alpha | |
- name: Move build artifact out of the way | |
run: mv dist dist.old | |
- name: Create dotnet artifact | |
run: cd .repo/packages/@aws-cdk/cli-lib-alpha && npx projen package:dotnet | |
- name: Collect dotnet artifact | |
run: mv .repo/packages/@aws-cdk/cli-lib-alpha/dist dist | |
- name: Release | |
env: | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
run: npx -p publib@latest publib-nuget | |
aws-cdk-cli-lib-alpha_release_golang: | |
name: "@aws-cdk/cli-lib-alpha: Publish to GitHub Go Module Repository" | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-aws-cdk-cli-lib-alpha == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.18.0 | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: aws-cdk-cli-lib-alpha_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- 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/packages/@aws-cdk/cli-lib-alpha | |
- name: Move build artifact out of the way | |
run: mv dist dist.old | |
- name: Create go artifact | |
run: cd .repo/packages/@aws-cdk/cli-lib-alpha && npx projen package:go | |
- name: Collect go artifact | |
run: mv .repo/packages/@aws-cdk/cli-lib-alpha/dist dist | |
- name: Release | |
env: | |
GIT_USER_NAME: github-actions | |
GIT_USER_EMAIL: github-actions@github.com | |
GITHUB_TOKEN: ${{ secrets.GO_GITHUB_TOKEN }} | |
run: npx -p publib@latest publib-golang | |
cdk_release_github: | |
name: "cdk: Publish to GitHub Releases" | |
needs: | |
- release | |
- cdk_release_npm | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-cdk == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: cdk_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
GITHUB_REF: ${{ github.sha }} | |
run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi | |
cdk_release_npm: | |
name: "cdk: Publish to npm" | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
if: ${{ needs.release.outputs.latest_commit == github.sha && needs.release.outputs.publish-cdk == 'true' }} | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: cdk_build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Release | |
env: | |
NPM_DIST_TAG: latest | |
NPM_REGISTRY: registry.npmjs.org | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx -p publib@latest publib-npm |