-
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.
- Loading branch information
1 parent
19542f5
commit 8cafdf3
Showing
4 changed files
with
48 additions
and
1 deletion.
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,3 @@ | ||
# This file is define code owners of the repository, more details about the GitHub feature here https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners | ||
|
||
- @hamikhambardzumyan |
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,31 @@ | ||
name: Publish to NPM | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: 📥 Install dependencies | ||
run: npm install | ||
- name: 🔧 Build | ||
run: npm run build | ||
- name: 📦 Publish package on NPM | ||
run: cd dist && npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_ACCESS_TOKEN }} | ||
- name: 🚀 Run bump up commit | ||
run: | | ||
git config --global user.name "Hamik Hambardzumyan" | ||
git config --global user.email "hamik.hambardzumyan@softconstruct.com" | ||
npm run bump-up-commit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { execCommand } from './utils'; | ||
import pgk from '../package.json'; | ||
|
||
const filesToCommit = 'package.json package-lock.json'; // TODO: add CHANGELOG.md file | ||
const commitMessage = `Bump up library version to ${pgk.version}`; | ||
const tagName = `v${pgk.version}`; | ||
const defaultBranch = 'main'; | ||
|
||
execCommand( | ||
`git add ${filesToCommit} && git commit -m '${commitMessage}' && git push origin ${defaultBranch}` | ||
); | ||
execCommand(`git tag ${tagName} && git push origin ${tagName}`); |