forked from codex-team/editor.js
-
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
7624448
commit 19e75fb
Showing
2 changed files
with
82 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,40 @@ | ||
name: Release Notes and NPM Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
release-notes: | ||
name: Release Notes | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: marcantondahmen/release-notes-action@master | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
prerelease: false | ||
draft: false | ||
filter: "^(feat|fix|refactor|docs)" | ||
strict: true | ||
npm-publish: | ||
name: NPM Publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
with: | ||
persist-credentials: false | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
registry-url: "https://registry.npmjs.org" | ||
- name: Install | ||
run: npm ci | ||
- name: Build | ||
run: npm run build | ||
- name: Publish | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
|
||
if [[ $(git status -s) ]]; then | ||
echo "Working directory is not clean!" | ||
git status -s | ||
echo | ||
fi | ||
|
||
echo "Choose type of release:" | ||
echo | ||
echo " 1) Patch (default)" | ||
echo " 2) Minor" | ||
echo " 3) Major" | ||
echo | ||
read -n 1 -p "Please select a number or press Enter for a patch: " option | ||
echo | ||
|
||
case $option in | ||
1) version=patch ;; | ||
2) version=minor ;; | ||
3) version=major ;; | ||
*) version=patch ;; | ||
esac | ||
|
||
while true; do | ||
read -p "Create $version version? (y/n) " continue | ||
case $continue in | ||
[Yy]*) | ||
break | ||
;; | ||
[Nn]*) | ||
exit 0 | ||
;; | ||
*) | ||
echo "Please only enter \"y\" or \"n\"." | ||
;; | ||
esac | ||
done | ||
echo | ||
|
||
npm version $version | ||
git push origin && git push origin --tags |