Skip to content

🐛 Remove depreacted atob to allow modern jwt tokens #71

🐛 Remove depreacted atob to allow modern jwt tokens

🐛 Remove depreacted atob to allow modern jwt tokens #71

Workflow file for this run

name: Build and Release
on:
push:
tags:
- v*
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12'
- run: |
npm install
npm run test:unit
npm run test:integration
env:
CI: true
publish-github-package:
needs: run-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12'
registry-url: https://npm.pkg.github.com/
- run: npm install
- run: sed -i '2s/sipgateio/\@sipgate-io\/sipgateio/' package.json
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.ACCESS_TOKEN}}
publish-github-release:
needs: run-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12'
- run: |
npm install
npm run bundle
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Commit Bundle
run: |
git config --local user.email ${{ secrets.SECRET_MAIL }}
git config --local user.name "sipgateio-team"
git checkout -b bundle/publish
git add --force bundle/sipgate-io.min.js
sed -i 's|https://cdn.jsdelivr.net/gh/sipgate-io/sipgateio-node@latest/bundle/sipgate-io.min.js|https://cdn.jsdelivr.net/gh/sipgate-io/sipgateio-node@${{ steps.get_version.outputs.VERSION }}/bundle/sipgate-io.min.js|g' README.md
git add README.md
git commit -m "publish: version ${{ steps.get_version.outputs.VERSION }}" --no-verify
git tag ${{ steps.get_version.outputs.VERSION }} --force
git push --tags --force
- name: Create GitHub Release
uses: fnkr/[email protected]
env:
GHR_PATH: bundle/sipgate-io.min.js
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
publish-npm-package:
needs: run-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12'
- run: npm install
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}