-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add NPM Upload GitHub action - Add release scripts - Update dependabot to check GitHub actions
- Loading branch information
Showing
7 changed files
with
57 additions
and
3 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
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
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,24 @@ | ||
name: Publish to NPM | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ':bellhop_bell: Checkout Package' | ||
uses: actions/checkout@v2 | ||
- name: ':gear: Setup Node.JS' | ||
uses: actions/setup-node@v2.1.2 | ||
with: | ||
node-version: 14 | ||
- name: ':building_construction: Build Package' | ||
run: | | ||
npm install | ||
npm run build | ||
- name: ':rocket: Publish to NPM' | ||
uses: JS-DevTools/npm-publish@v1 | ||
with: | ||
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,9 @@ | ||
#!/bin/sh | ||
|
||
last_version=$(git tag --sort v:refname | tail -n 2 | head -n 1) | ||
echo "Getting commit history since $last_version" | ||
num_commits=$(git rev-list --count $last_version..HEAD) | ||
echo "Found $num_commits commits since last revision" | ||
git_log=$(git log -n $num_commits --pretty="format:* %s %n") | ||
linked_log=$(echo "Release Notes: \n\n$git_log" | sed -e 's/#\([0-9]*\)/[#\1](https:\/\/github.com\/rogebrd\/dropbox-oauth-popup\/pull\/\1)/g') | ||
echo "\n\n$linked_log" |
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,17 @@ | ||
#!/bin/sh | ||
|
||
if [ -z $1 ]; then | ||
echo "error: $0 needs a version number as argument."; | ||
exit 1 | ||
else | ||
set -ex | ||
NEW_VERSION=$1 | ||
|
||
git checkout master | ||
git reset --hard HEAD | ||
|
||
git tag "v${NEW_VERSION}" -m "${NEW_VERSION} release" | ||
|
||
git push origin | ||
git push origin --tags | ||
fi |