-
Notifications
You must be signed in to change notification settings - Fork 12
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 #12 from openameba/chore/prepare-publish
Setup for release
- Loading branch information
Showing
4 changed files
with
67 additions
and
2 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,22 @@ | ||
name: publishing | ||
|
||
on: | ||
push: | ||
tags: | ||
- '@openameba/*' | ||
|
||
jobs: | ||
publish: | ||
name: publishing | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: 14 | ||
- name: Log in to npm | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
npm whoami | ||
- name: Publishing with lerna | ||
run: npx lerna publish from-git |
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,34 @@ | ||
name: versioning | ||
|
||
on: | ||
push: | ||
branches: | ||
- version/major | ||
- version/minor | ||
- version/patch | ||
- version/premajor | ||
- version/preminor | ||
- version/prepatch | ||
- version/prerelease | ||
|
||
jobs: | ||
version: | ||
name: versioning | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: 14 | ||
- name: Set git user | ||
run: | | ||
git config --global user.email "<>" | ||
git config --global user.name "openameba" | ||
- name: Extract version from branch name | ||
run: echo "::set-output name=version::$(echo ${GITHUB_REF##*/})" | ||
id: extract_version | ||
- name: Versioning with lerna | ||
# also see some options in lerna.json | ||
run: npx lerna version ${{ steps.extract_version.outputs.version }} --conventional-commits --create-release github --yes --no-private | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
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