-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from aligent/feature/DO-1311-release-pipelines
DO-1311: Release pipelines
- Loading branch information
Showing
3 changed files
with
20 additions
and
6 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 |
---|---|---|
@@ -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: | ||
|
@@ -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 | ||
|
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
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