Config Plugins: Added Expo config plugins for iOS and Android permissions. Automatically add required motion activity permissions (NSMotionUsageDescription for iOS and android.permission.ACTIVITY_RECOGNITION for Android) when using the library. (minor) release by @RevanToma #1
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: NPM Publish | |
run-name: ${{ inputs.description }} (${{ inputs.release_type }}) release by @${{ github.actor }} | |
on: | |
workflow_dispatch: | |
inputs: | |
description: | |
description: 'Description for the release' | |
required: false | |
type: string | |
release_type: | |
description: 'Release Type' | |
required: true | |
default: 'patch' | |
type: choice | |
options: | |
- 'patch' | |
- 'minor' | |
- 'major' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install | |
- name: Run linting | |
run: npm run lint | |
- name: Run typechecking | |
run: npm run typecheck | |
publish-to-npm: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
registry-url: https://registry.npmjs.org/ | |
- name: Set Git config | |
run: | | |
git config user.name "$(git log -n 1 --pretty=format:%an)" | |
git config user.email "$(git log -n 1 --pretty=format:%ae)" | |
- name: Update version | |
id: update_version | |
run: echo "VERSION=$(npm version ${{ github.event.inputs.release_type }} -m \"%s ${{ github.event.inputs.description }}\")" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: npm install | |
- name: Publish to NPM | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Push tags | |
run: git push --follow-tags | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ env.VERSION }} ${{ github.event.inputs.description }} | |
tag_name: ${{ env.VERSION }} | |
generate_release_notes: true |