Skip to content

Add automated deep linking handling. #3

Add automated deep linking handling.

Add automated deep linking handling. #3

Workflow file for this run

on:
push:
branches:
- main
- 'release/**'
pull_request:
branches:
- main
- 'release/**'
permissions:
id-token: write
contents: write
pull-requests: write
jobs:
nodejs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.19
registry-url: 'https://registry.npmjs.org'
- name: Merge PR into target before building
if: github.event_name == 'pull_request'
env:
BASE_BRANCH: ${{ github.base_ref }}
run: |
git config --global user.email "github@rhosys.github.com"
git config --global user.name "GitHub Runner"
git fetch origin $BASE_BRANCH --deepen=50
git merge origin/${BASE_BRANCH} --allow-unrelated-histories --no-edit
- name: Install packages
run: npm ci
- name: Run build
run: npm run build
- name: Test
run: npm run lint && npm run test
- name: Deploy to NPM
if: github.ref != 'refs/heads/main' && github.event_name == 'push'
# Version 11.5.1 or later is required for npm publish
run: |
npm install -g npm@latest
npm publish --provenance --access public
- name: Create Github Release and Tag
if: github.ref != 'refs/heads/main' && github.event_name == 'push'
run: |
git tag ${GITHUB_REF/refs\/heads\/release\//}.$GITHUB_RUN_NUMBER
git push origin ${GITHUB_REF/refs\/heads\/release\//}.$GITHUB_RUN_NUMBER