Skip to content

chore(release): v0.1.1 #6

chore(release): v0.1.1

chore(release): v0.1.1 #6

Workflow file for this run

name: Release
on:
push:
branches:
- main
workflow_dispatch: {}
jobs:
release:
runs-on: ubuntu-latest
container:
image: jsii/superchain:1-bookworm-slim-node22
if: ${{ !contains(github.event.head_commit.message, 'chore(release):') }}
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Install pnpm and dependencies
run: |
sudo corepack enable
sudo corepack prepare pnpm@latest --activate
pnpm install
- name: Cache NPM dependencies
uses: actions/[email protected]
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Bump version
run: bin/version.bash
- name: Set git identity
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
- name: Commit changes
run: |
git commit -avm "chore(release): bump version"
- name: Assume role using AWS credentials
uses: aws-actions/[email protected]
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.CDK_DEPLOY_REGION }}
- name: Run build
env:
CDK_DEPLOY_ACCOUNT: ${{ secrets.CDK_DEPLOY_ACCOUNT }}
CDK_DEPLOY_REGION: ${{ secrets.CDK_DEPLOY_REGION }}
CDK_DEFAULT_ACCOUNT: ${{ secrets.CDK_DEFAULT_ACCOUNT }}
CDK_DEFAULT_REGION: ${{ secrets.CDK_DEFAULT_REGION }}
AWS_REGION: ${{ secrets.CDK_DEPLOY_REGION }}
run: pnpm run ci:gha
- name: Run Package
run: pnpm run jsii:pacmak:parallel
- name: Clean up node_modules
run: bin/clean_tgz.bash
- name: Github Release
env:
GITHUB_TOKEN: ${{ secrets.P6_A_GH_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_REF: ${{ github.ref }}
run: bin/release.bash
- name: Upload artifact
uses: actions/[email protected]
with:
name: build-artifact
path: dist
release_npm:
name: Release to NPMJS
needs: release
runs-on: ubuntu-latest
container:
image: jsii/superchain:1-bookworm-slim-node22
if: ${{ !contains(github.event.head_commit.message, 'chore(release):') }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Install pnpm and dependencies
run: |
sudo corepack enable
sudo corepack prepare pnpm@latest --activate
pnpm install
- name: Cache NPM dependencies
uses: actions/[email protected]
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Download build artifacts
uses: actions/[email protected]
with:
name: build-artifact
path: dist
- name: Publish to NPM
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
pnpm run publish:npm
release_pypi:
name: Release to PYPI
needs: release
runs-on: ubuntu-latest
container:
image: jsii/superchain:1-bookworm-slim-node22
if: ${{ !contains(github.event.head_commit.message, 'chore(release):') }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Install pnpm and dependencies
run: |
sudo corepack enable
sudo corepack prepare pnpm@latest --activate
pnpm install
- name: Cache NPM dependencies
uses: actions/[email protected]
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Download build artifacts
uses: actions/[email protected]
with:
name: build-artifact
path: dist
- name: Setup Python
uses: actions/[email protected]
with:
python-version: '3.x'
- name: Publish to PYPI
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
pnpm run publish:pypi
release_nuget:
name: Release to Nuget
needs: release
runs-on: ubuntu-latest
container:
image: jsii/superchain:1-bookworm-slim-node22
if: ${{ !contains(github.event.head_commit.message, 'chore(release):') }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Install pnpm and dependencies
run: |
sudo corepack enable
sudo corepack prepare pnpm@latest --activate
pnpm install
- name: Cache NPM dependencies
uses: actions/[email protected]
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Download build artifacts
uses: actions/[email protected]
with:
name: build-artifact
path: dist
- name: Publish to Nuget
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
pnpm run publish:nuget
release_golang:
name: Release to GoLang
needs: release
runs-on: ubuntu-latest
container:
image: jsii/superchain:1-bookworm-slim-node22
if: ${{ !contains(github.event.head_commit.message, 'chore(release):') }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Install pnpm and dependencies
run: |
sudo corepack enable
sudo corepack prepare pnpm@latest --activate
pnpm install
- name: Cache NPM dependencies
uses: actions/[email protected]
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Download build artifacts
uses: actions/[email protected]
with:
name: build-artifact
path: dist
- name: Publish to GoLang
env:
GIT_USER_NAME: github-actions
GIT_USER_EMAIL: [email protected]
GH_TOKEN: ${{ secrets.GO_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GO_GITHUB_TOKEN }}
run: |
git config --global user.name "$GIT_USER_NAME"
git config --global user.email "$GIT_USER_EMAIL"
git remote set-url origin "https://[email protected]/$GITHUB_REPOSITORY.git"
npm run publish:golang
release_maven:
name: Release to Maven
needs: release
runs-on: ubuntu-latest
container:
image: jsii/superchain:1-bookworm-slim-node22
if: ${{ !contains(github.event.head_commit.message, 'chore(release):') }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Install pnpm and dependencies
run: |
sudo corepack enable
sudo corepack prepare pnpm@latest --activate
pnpm install
- name: Cache NPM dependencies
uses: actions/[email protected]
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Download build artifacts
uses: actions/[email protected]
with:
name: build-artifact
path: dist
- name: Publish to Maven
env:
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: pnpm run publish:maven