-
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
Showing
3 changed files
with
62 additions
and
22 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,60 @@ | ||
name: Run publish | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push event but only for the master branch | ||
push: | ||
branches: [master] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
publish: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# The type of node version that the job will run on | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
# Use node | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
# Run version bump step | ||
- name: Run version bump | ||
uses: phips28/gh-action-bump-version@v10.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Get tag step | ||
- name: Get tag | ||
id: tag | ||
uses: WyriHaximus/github-action-get-previous-tag@v1 | ||
with: | ||
fallback: 1.0.0 # Optional fallback tag to use when no tag can be found | ||
# Run release step | ||
- name: Run release | ||
uses: marvinpinto/action-automatic-releases@latest | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
automatic_release_tag: ${{ steps.tag.outputs.tag }} | ||
prerelease: false | ||
# Run install step | ||
- run: npm ci | ||
|
||
# Run publish step | ||
- name: Run publish | ||
uses: JS-DevTools/npm-publish@v1 | ||
with: | ||
registry: https://npm.pkg.github.com/ | ||
token: ${{ secrets.GITHUB_TOKEN }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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