Skip to content

Commit

Permalink
Merge branch 'main' into feature/DO-1285-upgrade-cdk
Browse files Browse the repository at this point in the history
  • Loading branch information
krishanthisera committed Jul 8, 2022
2 parents cd65778 + 21d6a6b commit e7f3d3a
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 288 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/release-basic-auth.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/release-cloudfront-security-headers.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/release-geoip-redirect.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/release-prerender-proxy.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/release-rabbitmq.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/release-serverless-deploy-iam.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/release-static-hosting.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/release-waf.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish to NPM

on:
release:
tags:
- '**-[0-9].[0-9].[0-9]'
- '**-[0-9].[0-9].[0-9]-*'
types: [published]

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
# Source checkout
- uses: actions/checkout@v2
with:
ref: ${{ github.event.release.target_commitish }}
# Setting Node environment
- name: Setting up Node environment
uses: actions/setup-node@v1
with:
node-version: 16
registry-url: https://registry.npmjs.org/
# Environment configuration
- name: Preparing environment for release
run: |
VERSION=$(echo $GITHUB_REF_NAME | sed 's/^.*[A-Za-z]-//g')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "PACKAGE=$(echo $GITHUB_REF_NAME | sed "s/-${VERSION}//g")" >> $GITHUB_ENV
# Release process
- name: Release
run: |
npm ci
git config --global user.name "Automated NPM Release"
git config --global user.email "[email protected]"
npm version $VERSION --allow-same-version --workspace "@aligent/cdk-${{env.PACKAGE}}"
npm run build --workspace "@aligent/cdk-${{env.PACKAGE}}"
npm test --workspace "@aligent/cdk-${{env.PACKAGE}}" --if-present
npm publish --access public --workspace "@aligent/cdk-${{env.PACKAGE}}"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: git push
env:
github-token: ${{ secrets.GITHUB_TOKEN }}
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,25 @@ Construct | Description
[rabbitmq](packages/rabbitmq) |
[static-hosting](packages/static-hosting) |
[waf](packages/waf) |

## Making a Release

Each construct/package maintains an independent release cycle.
Once the changes have been approved, you can commit/merge the changes to the main branch and create a release.
**Note that for all the finalized releases, the source branch should be the main branch.**

If the release is experimental, you may use the `main` or the feature branch.

### Release Tags

When making a release (including experimental releases), the release tag should maintain following formation.

- experimental releases: [package-name]-[version number]-[experimental tag]
- finalized releases: [package-name]-[version number]

**Note that the version number should follow `[0-9].[0-9].[0-9]` structure.**

| <!-- --> | <!-- --> |
|---------------|---------------|
| Experimental | 1.1.0-beta |
| Final | 1.1.0 |

0 comments on commit e7f3d3a

Please sign in to comment.