-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* avatar and styles component * tests for avatar * github actions for auto bump [bump major] Co-authored-by: Balraj Gahlot <[email protected]> Co-authored-by: github-actions[bot] <[email protected]>
- Loading branch information
1 parent
c5c919d
commit 6237175
Showing
24 changed files
with
30,464 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,77 @@ | ||
name: Publish packages | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- "dependabot/**" | ||
|
||
env: | ||
BRANCH_TAG: ${{ github.ref_name == 'main' && 'latest' || github.ref_name }} | ||
BRANCH: ${{ github.ref_name }} | ||
|
||
jobs: | ||
build_test_publish: | ||
runs-on: ubuntu-latest | ||
environment: "${{ github.ref_name == 'main' && 'prod' || '' }}" | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: https://registry.npmjs.org | ||
- uses: actions/checkout@v3 | ||
with: | ||
# pulls all commits and tags (needed for lerna to correctly version) | ||
fetch-depth: 0 | ||
|
||
- name: Setup git | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "github-actions[bot]" | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Run tests | ||
run: npm run test | ||
|
||
- name: Publish packages | ||
env: | ||
MAJOR_VERSION: ${{ contains(github.event.head_commit.message , '[bump major]') }} | ||
MINOR_VERSION: ${{ contains(github.event.head_commit.message , '[bump minor]') }} | ||
NODE_AUTH_TOKEN: ${{secrets.NPMJS_TOKEN}} | ||
run: | | ||
VERSION=${{ github.ref_name == 'main' && 'patch' || 'prerelease' }} | ||
if [ ${{ github.ref_name }} == 'main' ] | ||
then | ||
if [ $MINOR_VERSION == true ]; then VERSION="minor"; fi | ||
if [ $MAJOR_VERSION == true ]; then VERSION="major"; fi | ||
fi | ||
echo "Updating $VERSION.." | ||
npm run publish -- $VERSION --yes --dist-tag=$BRANCH_TAG --no-push --preid ${{ github.ref_name }} ${{ github.ref_name == 'main' && '' || '--include-merged-tags' }} | ||
TAG="`git describe --tags --abbrev=0`" | ||
echo "Published tag $TAG" | ||
echo "TAG=$TAG" >> $GITHUB_ENV | ||
- name: Generate token | ||
if: ${{ github.ref_name == 'main'}} | ||
id: generate_token | ||
uses: tibdex/github-app-token@v1 | ||
with: | ||
app_id: ${{ secrets.FUNDABOT_APP_ID }} | ||
private_key: ${{ secrets.FUNDABOT_PRIVATE_KEY }} | ||
|
||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }} | ||
run: | | ||
if [ "${BRANCH}" != "main" ]; then PRERELEASE="-p"; fi | ||
echo "Releasing version ${TAG} on branch ${BRANCH}" | ||
gh release create ${TAG} --target ${BRANCH} --generate-notes ${PRERELEASE} | ||
- name: Push changes | ||
env: | ||
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }} | ||
run: git push --follow-tags --atomic --no-verify |
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,4 @@ | ||
threshold: medium | ||
scopeconfig: | ||
- scope: node | ||
version: "1.0" |
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,7 @@ | ||
{ | ||
"packages": [ | ||
"packages/*" | ||
], | ||
"useWorkspaces": true, | ||
"version": "0.0.1-alpha.1" | ||
} |
Oops, something went wrong.