Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v2

- name: Add git tag
id: gittag
run: echo "gittag=$(git tag --points-at HEAD)" >> $GITHUB_OUTPUT

- uses: actions/setup-node@v3
with:
node-version: "18"
Expand All @@ -23,16 +27,20 @@ jobs:
npm run build-index
npm run build

- run: npm version prerelease --preid=dev --no-git-tag-version
- name: make new version
if: steps.gittag.outputs.gittag
run: npm version from-git --no-git-tag-version

- name: push the new tag to GitHub
if: steps.gittag.outputs.gittag
run: |
git config --global user.name 'Rig Automation'
git config --global user.email 'sinbad-io@users.noreply.github.com'
git add package.json
git commit -am "upgraded version of rig npm package [skip ci]"
git push

- run: npm publish --access=public
- name: set token
if: steps.gittag.outputs.gittag
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}