Skip to content

Commit

Permalink
Merge 05aea58 into 45f4a25
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-casey committed Feb 21, 2023
2 parents 45f4a25 + 05aea58 commit 98afd62
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,31 @@ jobs:
- run: npm ci
- run: npm run build --if-present

- name: timestamp
id: timestamp
- name: tag
id: tag
run: |
node ./scripts/timestamp.js
node ./scripts/tag.js ${{ github.event.release.tag_name }}
- name: build and publish
run: |
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
npm version patch --force --no-git-tag-version --yes --exact ${{ steps.timestamp.outputs.stamp }}
npm publish --access public --tag=unstable 2>&1
npm version --no-git-tag-version --yes --exact ${{ github.event.release.tag_name }}
npm publish --access public ${{ steps.tag.outputs.tag }} 2>&1
- name: Create PR to increment version
uses: peter-evans/create-pull-request@v3
with:
base: main
commit-message: 'chore(actions): publish ${{ github.event.release.tag_name }} to npm'
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: true
branch: ap-publish-${{ github.event.release.tag_name }}
delete-branch: true
title: 'chore(actions): publish ${{ github.event.release.tag_name }} to npm'
body: |
# Increment Versions
Update the package.json version numbers after publishing to NPM.
assignees: ${{ github.actor }}
reviewers: ${{ github.actor }}
draft: false

0 comments on commit 98afd62

Please sign in to comment.