This repository has been archived by the owner on Oct 6, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
TANGUY Antoine
committed
May 21, 2021
1 parent
7b510a4
commit 8edd66c
Showing
1 changed file
with
8 additions
and
29 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,36 +1,15 @@ | ||
name: Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version major | minor | patch' | ||
required: true | ||
default: 'minor' | ||
on: workflow_dispatch | ||
jobs: | ||
publish-npm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
- run: yarn install --frozen-lockfile | ||
- name: npm version | ||
run: | | ||
npm version ${{ github.event.inputs.version }} --git-tag-version=false | ||
- uses: EndBug/add-and-commit@v5 | ||
- uses: actions/checkout@v2 | ||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v2 | ||
with: | ||
# The arguments for the `git add` command (see the paragraph below for more info) | ||
# Default: '.' | ||
add: '.' | ||
|
||
# The name of the user that will be displayed as the author of the commit | ||
# Default: author of the commit that triggered the run | ||
author_name: Release Bot | ||
message: 'Bump version: by ${{github.actor}}' | ||
node-version: '14.x' | ||
- run: yarn install --frozen-lockfile | ||
- run: npm publish | ||
env: | ||
# This is necessary in order to push a commit to the repo | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged | ||
|
||
- uses: JS-DevTools/npm-publish@v1 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |