Skip to content

Commit

Permalink
Use the tag name for the version in npm (#10)
Browse files Browse the repository at this point in the history
* using the tag name for the version in npm

* adding debug job to github action

* printing github context as json

* echoing the github env as a context parameter
  • Loading branch information
jason-raitz authored Apr 11, 2024
1 parent cb1b7ed commit cc41016
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN_LIB_NPM }}

jobs:
debug:
runs-on: ubuntu-latest

steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "${GITHUB_CONTEXT}"

build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -88,5 +96,5 @@ jobs:
# NOTE: Assumes tag in form x.y.z
# TODO: figure out why ${{github.event.release.tag_name}} doesn't work
run: |
yarn version "${GITHUB_REF:10}" --immediate
yarn version "${github.ref_name}" --immediate
yarn npm publish --access public --tag latest

0 comments on commit cc41016

Please # to comment.