generated from p6m7g8/p6-template-cdk-construct-eslint-yarn-ts-flatfile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 01ae1a2
Showing
44 changed files
with
11,635 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixes # |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: auto-approve | ||
on: | ||
pull_request_target: | ||
types: | ||
- labeled | ||
- opened | ||
- synchronize | ||
- reopened | ||
- ready_for_review | ||
jobs: | ||
approve: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
if: | | ||
!github.event.pull_request.draft && | ||
!contains(github.event.pull_request.labels.*.name, 'do-not-merge') && | ||
(contains(github.event.pull_request.labels.*.name, 'auto-approve') || github.event.pull_request.user.login == 'pgollucci' || github.event.pull_request.user.login == 'p6m7g8-automation') | ||
steps: | ||
- uses: hmarr/auto-approve-action@v4.0.0 | ||
with: | ||
github-token: ${{ secrets.P6_A_GH_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: {} | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: jsii/superchain:1-bookworm-slim-node22 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4.2.2 | ||
- name: Restore NPM node_modules | ||
uses: actions/cache/restore@v4.1.2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: Install node_modules | ||
run: | | ||
sudo corepack enable | ||
yarn install | ||
- name: Cache NPM dependencies | ||
uses: actions/cache@v4.1.2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: Run build | ||
run: yarn run ci:gha | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4.6.0 | ||
with: | ||
directory: coverage | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
- name: Run Package | ||
run: yarn run jsii:pacmak:parallel |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: pull-request-lint | ||
on: | ||
pull_request_target: | ||
types: | ||
- labeled | ||
- opened | ||
- synchronize | ||
- reopened | ||
- ready_for_review | ||
- edited | ||
jobs: | ||
validate: | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5.5.3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
types: |- | ||
chore | ||
ci | ||
docs | ||
feat | ||
fix | ||
major | ||
perf | ||
refactor | ||
revert | ||
style | ||
test | ||
requireScope: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,229 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
if: ${{ !contains(github.event.head_commit.message, 'chore(release):') }} | ||
steps: | ||
- name: no-op | ||
run: echo "No-op" | ||
|
||
release_github: | ||
name: Release to Github | ||
needs: release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
bump: ${{ steps.bump.outputs.bump }} | ||
if: ${{ !contains(github.event.head_commit.message, 'chore(release):') }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Bump version | ||
id: bump | ||
run: | | ||
bin/version.bash | ||
if grep -E "^- (fix|feat|major)\!*" dist/changelog.md; then | ||
echo "bump=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "bump=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Github Release | ||
if: ${{ steps.bump.outputs.bump == 'true' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.P6_A_GH_TOKEN }} | ||
GITHUB_REPOSITORY: ${{ github.repository }} | ||
GITHUB_REF: ${{ github.ref }} | ||
run: | | ||
TAG_NAME=$(cat dist/releasetag.txt) | ||
if gh release view "$TAG_NAME" -R "$GITHUB_REPOSITORY" > /dev/null 2>&1; then | ||
echo "Release with tag $TAG_NAME already exists. Skipping release creation." | ||
else | ||
gh release create "$TAG_NAME" -R "$GITHUB_REPOSITORY" -F dist/changelog.md -t "$TAG_NAME" --target "$GITHUB_REF" | ||
echo "Release with tag $TAG_NAME created successfully." | ||
fi | ||
release_npmjs: | ||
name: Release to NPM JS | ||
needs: release_github | ||
runs-on: ubuntu-latest | ||
container: | ||
image: jsii/superchain:1-bookworm-slim-node22 | ||
if: ${{ needs.release_github.outputs.bump == 'true' && !contains(github.event.head_commit.message, 'chore(release):') }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Restore NPM node_modules | ||
uses: actions/cache/restore@v4.1.2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: Install node_modules | ||
run: | | ||
sudo corepack enable | ||
yarn install | ||
- name: Cache NPM node_modules | ||
uses: actions/cache@v4.1.2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: Bump version | ||
run: bin/version.bash | ||
- name: Compile | ||
run: yarn run compile | ||
- name: JSII Pacmak JS | ||
run: yarn run jsii:pacmak:js | ||
- name: Publish to NPM | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: yarn run publish:npm | ||
|
||
release_pypi: | ||
name: Release to PYPI | ||
needs: release_github | ||
runs-on: ubuntu-latest | ||
container: | ||
image: jsii/superchain:1-bookworm-slim-node22 | ||
if: ${{ needs.release_github.outputs.bump == 'true' && !contains(github.event.head_commit.message, 'chore(release):') }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5.3.0 | ||
with: | ||
python-version: '3.x' | ||
- name: Restore NPM node_modules | ||
uses: actions/cache/restore@v4.1.2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: Install node_modules | ||
run: | | ||
sudo corepack enable | ||
yarn install | ||
- name: Cache NPM node_modules | ||
uses: actions/cache@v4.1.2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: Bump version | ||
run: bin/version.bash | ||
- name: Compile | ||
run: yarn run compile | ||
- name: JSII Pacmak PY | ||
run: yarn run jsii:pacmak:py | ||
- name: Publish to PYPI | ||
env: | ||
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | ||
run: yarn run publish:pypi | ||
|
||
release_nuget: | ||
name: Release to Nuget | ||
needs: release_github | ||
runs-on: ubuntu-latest | ||
container: | ||
image: jsii/superchain:1-bookworm-slim-node22 | ||
if: ${{ needs.release_github.outputs.bump == 'true' && !contains(github.event.head_commit.message, 'chore(release):') }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Restore NPM node_modules | ||
uses: actions/cache/restore@v4.1.2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: Install node_modules | ||
run: | | ||
sudo corepack enable | ||
yarn install | ||
- name: Cache NPM node_modules | ||
uses: actions/cache@v4.1.2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: Bump version | ||
run: bin/version.bash | ||
- name: Compile | ||
run: yarn run compile | ||
- name: JSII Pacmak PY | ||
run: yarn run jsii:pacmak:dotnet | ||
- name: Publish to Nuget | ||
env: | ||
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | ||
run: | | ||
yarn run publish:nuget | ||
release_golang: | ||
name: Release to GoLang | ||
needs: release_github | ||
runs-on: ubuntu-latest | ||
container: | ||
image: jsii/superchain:1-bookworm-slim-node22 | ||
if: ${{ needs.release_github.outputs.bump == 'true' && !contains(github.event.head_commit.message, 'chore(release):') }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Restore NPM node_modules | ||
uses: actions/cache/restore@v4.1.2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: Install node_modules | ||
run: | | ||
sudo corepack enable | ||
yarn install | ||
- name: Cache NPM node_modules | ||
uses: actions/cache@v4.1.2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: Bump version | ||
run: bin/version.bash | ||
- name: Compile | ||
run: yarn run compile | ||
- name: JSII Pacmak GoLang | ||
run: yarn run jsii:pacmak:go | ||
- name: Publish to GoLang | ||
env: | ||
GIT_USER_NAME: github-actions | ||
GIT_USER_EMAIL: github-actions@github.com | ||
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://$GH_TOKEN@github.com/$GITHUB_REPOSITORY.git" | ||
yarn run publish:golang |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: upgrade-main | ||
|
||
on: | ||
workflow_dispatch: {} | ||
schedule: | ||
- cron: '0 14 * * *' | ||
|
||
jobs: | ||
upgrade: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: jsii/superchain:1-bookworm-slim-node22 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
ref: main | ||
- name: Restore NPM node_modules | ||
uses: actions/cache/restore@v4.1.2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: Install node_modules | ||
run: | | ||
sudo corepack enable | ||
yarn install | ||
- name: Cache NPM dependencies | ||
uses: actions/cache@v4.1.2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: Update Deps | ||
run: yarn up | ||
- name: Gather Diff | ||
id: diff | ||
run: | | ||
git diff > diff.txt | ||
echo "diff<<EOF" >> $GITHUB_ENV | ||
cat diff.txt >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
- name: Create Pull Request | ||
id: create-pr | ||
uses: peter-evans/create-pull-request@v7.0.5 | ||
with: | ||
token: ${{ secrets.P6_PGOLLUCCI_GH_TOKEN }} | ||
commit-message: |- | ||
chore(deps): upgrade dependencies | ||
branch: github-actions/upgrade-main | ||
title: "chore(deps): upgrade dependencies" | ||
labels: auto-merge | ||
body: | | ||
Upgrades project dependencies. The following changes were made: | ||
```diff | ||
${{ env.diff }} | ||
``` | ||
author: github-actions <github-actions@github.com> | ||
committer: github-actions <github-actions@github.com> | ||
signoff: true |
Oops, something went wrong.