Skip to content

fix: prioritize web fallback over app store URL in redirect handler #45

fix: prioritize web fallback over app store URL in redirect handler

fix: prioritize web fallback over app store URL in redirect handler #45

Workflow file for this run

name: Release
on:
push:
branches:
- main
# Only allow one release at a time
concurrency:
group: release
cancel-in-progress: false
jobs:
release:
name: Release to NPM & GitHub
runs-on: ubuntu-latest
# IMPORTANT: Only runs on main branch from the main repo (not forks)
if: github.repository == 'linkforty/core' && github.ref == 'refs/heads/main'
timeout-minutes: 20
environment: npm-production
permissions:
contents: write # To create releases and tags
issues: write # To comment on released issues
pull-requests: write # To comment on released PRs
id-token: write # For NPM provenance
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for semantic-release
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Update npm to latest
run: npm install -g npm@latest
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build
- name: Run tests
run: npm test
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
# Notify on failure
notify-failure:
name: Notify Release Failure
runs-on: ubuntu-latest
needs: release
if: failure() && github.repository == 'linkforty/core'
permissions:
issues: write # To create failure notification issues
steps:
- name: Create issue on failure
uses: actions/github-script@v7
with:
script: |
const title = `Release failed on ${new Date().toISOString()}`;
const body = `The release workflow failed. Please check the [workflow run](${context.payload.repository.html_url}/actions/runs/${context.runId}).`;
// Check if issue already exists
const issues = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: 'release-failure'
});
if (issues.data.length === 0) {
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: title,
body: body,
labels: ['release-failure', 'automated']
});
}