Skip to content

Merge branch 'master' of github.com:iotinga/react-native-ble-library #65

Merge branch 'master' of github.com:iotinga/react-native-ble-library

Merge branch 'master' of github.com:iotinga/react-native-ble-library #65

Workflow file for this run

name: Build and publish BLE library
on:
push:
branches:
- master
- hotfix/*
jobs:
start-build:
name: Build and publish ble library
runs-on: linux-pve
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
scope: '@iotinga'
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.64.0
id: version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
- name: Bump version
working-directory: library/
run: npm version ${{ steps.version.outputs.new_tag }}
- name: Commit new version
continue-on-error: true
run: git commit -am "[CI] bump version to $IOTINGA_VERSION" && git push
- name: Install dependencies
working-directory: library/
run: npm ci
- name: Publish npm package
run: npm publish --access public
working-directory: library/
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://npm.pkg.github.com'
scope: '@iotinga'
- name: Publish npm package (on private registry)
run: npm publish
working-directory: library/
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}