Skip to content

Commit

Permalink
Add package version
Browse files Browse the repository at this point in the history
  • Loading branch information
pacholoamit committed Feb 12, 2023
1 parent 6c9b12b commit f5901a7
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ jobs:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm publish
- name: publish
run: |
npx can-npm-publish --verbose && npm publish || echo "Does not publish"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: package-version
run: node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
- name: package-version-to-git-tag
uses: pkgdeps/git-tag-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repo: ${{ github.repository }}
version: ${{ env.PACKAGE_VERSION }}
git_commit_sha: ${{ github.sha }}
git_tag_prefix: "v"

0 comments on commit f5901a7

Please sign in to comment.