etherpad-lite/.github/workflows/releaseEtherpad.yaml.yml
SamTV12345 768400de90
Potential fix for code scanning alert no. 110: Workflow does not contain permissions (#7130)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-09-12 21:52:58 +02:00

44 lines
1.4 KiB
YAML

name: releaseEtherpad.yaml
permissions:
contents: read
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 10
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
if: always()
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Only install direct dependencies
run: pnpm config set auto-install-peers false
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Rename etherpad
working-directory: ./src
run: sed -i 's/ep_etherpad-lite/ep_etherpad/g' package.json
- name: Release to npm
run: pnpm publish --no-git-checks
working-directory: ./src
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PRIVATE_TOKEN }}