-
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.
chore(promote): create promote workflow
- Loading branch information
Showing
2 changed files
with
45 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,20 @@ | ||
#!/bin/bash | ||
GIT_USERNAME="patternfly-build" | ||
GH_REPO=${GITHUB_REPOSITORY} | ||
REPO="github.com/${GH_REPO}" | ||
echo "Preparing release environment..." | ||
git config user.email "[email protected]" | ||
git config user.name ${GIT_USERNAME} | ||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | ||
|
||
echo "Promoting a release..." | ||
# Lerna is complicated. Commands: https://github.com/lerna/lerna/tree/master/commands | ||
# Identify packages that have been updated since the previous tagged release | ||
# Update their versions and changelogs according to angular commit guidelines | ||
# https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit | ||
|
||
# publish to github and npm | ||
# yarn run lerna publish --conventional-commits --conventional-graduate --no-private --dist-tag=latest --yes | ||
|
||
# dry run | ||
yarn run lerna version --conventional-commits --conventional-graduate --no-private --yes --no-git-tag-version --no-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: promote | ||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- v2.* | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_SECRET }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: "0" | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Install deps | ||
run: yarn install | ||
- name: Build dist | ||
run: yarn build | ||
- name: Deploy to NPM and Github | ||
run: .github/promote.sh |