Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

chore(deps): bump tar from 6.1.15 to 6.2.1 (#30) #24

chore(deps): bump tar from 6.1.15 to 6.2.1 (#30)

chore(deps): bump tar from 6.1.15 to 6.2.1 (#30) #24

on:
push:
branches:
- main
permissions:
contents: read
name: release-please
jobs:
release-please:
permissions:
contents: write # google-github-actions/release-please-action
pull-requests: write # google-github-actions/release-please-action
actions: write # actions/upload-artifact
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
release_version: "${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}"
steps:
- uses: google-github-actions/release-please-action@c078ea33917ab8cfa5300e48f4b7e6b16606aede # v3.7.8
id: release
with:
release-type: node
package-name: garden-dev-cluster
extra-files: |
README.md
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 18
if: ${{ steps.release.outputs.release_created }}
- name: Setup Cloud Formation Formatter
if: ${{ steps.release.outputs.release_created }}
run: |
mkdir -p rain/bin
cd rain
gh release download --repo aws-cloudformation/rain --pattern "*_linux-amd64.zip" --output "rain.zip"
cd bin
unzip -j ../rain.zip "*/rain"
echo "$PWD" >> "$GITHUB_PATH"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run cdk synth
if: ${{ steps.release.outputs.release_created }}
run: |
npm install
npm run synth
npm run rain
env:
CDK_RELEASE_VERSION: "${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}"
CDK_ENVIRONMENT: prod
- name: Archive release assets
if: ${{ steps.release.outputs.release_created }}
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: release-assets
path: |
cdk.out
*.template.yaml
upload-assets:
runs-on: ubuntu-latest
permissions:
contents: read # actions/checkout
id-token: write # aws-actions/configure-aws-credentials
actions: read # actions/download-artifact
strategy:
matrix:
region: [
"ap-northeast-1",
"ap-northeast-2",
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"ca-central-1",
"eu-central-1",
"eu-north-1",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"sa-east-1",
"us-east-1",
"us-east-2",
"us-west-2"
]
needs:
- release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
# these if statements ensure that a publication only occurs when
# a new release is created:
- uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 18
- name: Download a single artifact
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: release-assets
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # 2.0.0
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
role-session-name: github-action-dev-cluster-cdk-release
aws-region: ${{ matrix.region }}
- run: npm install
- run: npm run upload-assets
env:
AWS_REGION: ${{ matrix.region }}
- name: Publish the CloudFormation templates
if: ${{ matrix.region == 'eu-central-1' }}
run: |
npm run upload-templates
env:
CDK_RELEASE_VERSION: ${{ needs.release-please.outputs.release_version }}