Skip to content

Commit

Permalink
Merge pull request #112 from aligent/feature/DO-1311-release-pipelines
Browse files Browse the repository at this point in the history
DO-1311: Release pipelines
  • Loading branch information
TheOrangePuff authored May 9, 2022
2 parents 5ff164d + 7897495 commit f5343ad
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: Publish to NPM

env:
package: basic-auth

on:
release:
tags:
- '$package-*' # Push events matching the package name, i.e. basic-auth-1.12.6
types: [published]

jobs:
Expand All @@ -16,13 +21,14 @@ jobs:
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: echo "VERSION=${{ github.event.release.tag_name }}#"$package-"" # strip the package out of the release name
- run: npm ci
- run: git config --global user.name "Automated NPM Release"
- run: git config --global user.email "[email protected]"
- run: npm version ${{ github.event.release.tag_name }} --allow-same-version
- run: npm run build
- run: npm test
- run: npm publish --access public
- run: npm version $VERSION --allow-same-version --workspace "@aligent/cdk-${package}"
- run: npm run build --workspace "@aligent/cdk-${package}"
- run: npm test --workspace "@aligent/cdk-${package}" --if-present
- run: npm publish --access public --workspace "@aligent/cdk-${package}" --dry-run
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: git push
Expand Down
6 changes: 5 additions & 1 deletion packages/basic-auth/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
"inlineSources": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false,
"typeRoots": ["./node_modules/@types"]
"typeRoots": ["./node_modules/@types"],
"types": [
"node",
"jest"
]
},
"exclude": [
"cdk.out",
Expand Down
6 changes: 5 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
"inlineSources": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false,
"typeRoots": ["./node_modules/@types"]
"typeRoots": ["./node_modules/@types"],
"types": [
"node",
"jest"
],
},
"exclude": [
"**/node_modules",
Expand Down

0 comments on commit f5343ad

Please sign in to comment.