Skip to content

ci: manual publish action #2

ci: manual publish action

ci: manual publish action #2

Workflow file for this run

name: Publish
on:
pull_request:
workflow_dispatch:
inputs:
tag:
description: "The tagged version to release."
required: true
type: "string"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ref/tags/production@0.0.12
- uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"
- run: npm ci
- run: npm run lint:ci
- run: npm run build
- run: |
cd wormhole-connect-loader
IFS='@' read -a strarr <<< production@0.0.12
sed -i "s/\"version\": .*/\"version\": \"${strarr[1]}$(echo $([ ${strarr[0]} == "production" ] && echo "" || echo "-${strarr[0]}"))\",/" package.json
npm publish --tag $(echo $([ ${strarr[0]} == "production" ] && echo "latest" || echo ${strarr[0]})) --access public --dry-run