Skip to content

Update release.yml

Update release.yml #16

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
branches:
- master
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.GITEA_NPM_REGISTRY }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node.js lts/*
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'
registry-url: https://gitea.midpathsoftware.com/api/packages/gnpaone/npm
always-auth: true
scope: '@rrweb'
- run: |
# Define the .npmrc file path
NPMRC_FILE="$RUNNER_TEMP/.npmrc"
# Check if the file exists
if [[ -f "$NPMRC_FILE" ]]; then
cat "$NPMRC_FILE"
else
echo "Error: .npmrc file not found in $RUNNER_TEMP"
exit 1
fi
# - name: Install Dependencies
# run: yarn install --frozen-lockfile
- name: Set registry settings
run: |
cat << EOF > "$HOME/.npmrc"
registry=https://gitea.midpathsoftware.com/api/packages/gnpaone/npm/
@rrweb:registry=https://gitea.midpathsoftware.com/api/packages/gnpaone/npm/
//gitea.midpathsoftware.com/api/packages/gnpaone/npm/:_authToken="${NODE_AUTH_TOKEN}"
//gitea.midpathsoftware.com/api/packages/gnpaone/npm/:always-auth=true
EOF
- run: |
NPMRC_FILE="$HOME/.npmrc"
# Check if the file exists
if [[ -f "$NPMRC_FILE" ]]; then
cat "$NPMRC_FILE"
fi
- run: |
CURRENT_DIR=$(pwd)
# Define the .npmrc file path
NPMRC_FILE="$CURRENT_DIR/.npmrc"
# Check if the file exists
if [[ -f "$NPMRC_FILE" ]]; then
cat "$NPMRC_FILE"
else
echo "Error: .npmrc file not found in $CURRENT_DIR"
exit 1
fi
# - name: Create Release Pull Request or Publish to npm
# id: changesets
# uses: changesets/action@v1
# with:
# publish: yarn run release
# env:
# NODE_OPTIONS: '--max-old-space-size=4096'
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}