Merge pull request #22 from ant-media/update-new-version-test #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish SNAPSHOT to npmjs | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish-npmjs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Update The Snapshot | |
id: get_version | |
run: echo "VERSION=$(echo ${GITHUB_REF##*/} | cut -d v -f 2)" >> $GITHUB_OUTPUT | |
- run: npm install --include=dev | |
- run: npm run compile | |
- run: npm test | |
#Fix this versioning for the snapshots | |
- run: npm version 2.12.0-SNAPSHOT"-`date +"%Y-%b-%d-%I-%M"`" --no-git-tag-version | |
- run: npm publish --tag SNAPSHOT | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |