Skip to content

Commit

Permalink
trying latest workflow scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalpiotrowski committed Mar 18, 2024
1 parent c2334d7 commit 4ad1883
Show file tree
Hide file tree
Showing 4 changed files with 11,481 additions and 12 deletions.
34 changes: 24 additions & 10 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,27 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20"
- run: npm ci
- run: npm test
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}

- name: Checkout repository
uses: actions/checkout@v4.1.2
- name: Set up Node.js
uses: actions/setup-node@v4.0.2
with:
node-version: 20
- run: npm ci # requires package-lock.json
- run: npm test
- run: npm dist
- name: Publish if version has been updated
uses: pascalgn/npm-publish-action@1.3.9
with: # All of theses inputs are optional
tag_name: "v%s"
tag_message: "v%s"
create_tag: "true"
commit_pattern: "^Release (\\S+)"
workspace: "."
commit_user: "rafalpiotrowski" # if not provided will extract from the repo
publish_command: "npm" # options are `yarn`, `npm` or `skip`
# publish_args: "--non-interactive"
# commit_email: "" # if not provided will extract from the repo
env: # More info about the environment variables in the README
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # You need to set this in your repo settings
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# project ignores
package-lock.json
yarn.lock

# Logst
Expand Down
Loading

0 comments on commit 4ad1883

Please sign in to comment.