-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically bumb the version on publish of a release
- Loading branch information
1 parent
170d6ed
commit c74e683
Showing
1 changed file
with
22 additions
and
4 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 |
---|---|---|
@@ -1,22 +1,40 @@ | ||
name: Publish | ||
|
||
on: | ||
create: | ||
|
||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
name: Publish | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
registry-url: https://registry.npmjs.org/ | ||
registry-url: "https://registry.npmjs.org/" | ||
|
||
- name: Install | ||
run: yarn --frozen-lockfile --non-interactive | ||
|
||
- name: Setup GIT | ||
run: | | ||
git config user.email "admin@minidigger.me" | ||
git config user.name "MiniDigger" | ||
- name: Bump version | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
yarn version --new-version $GITHUB_REF | ||
git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY" | ||
- name: Publish | ||
run: yarn publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |