Skip to content

v0.0.4-rc

v0.0.4-rc #6

Workflow file for this run

name: Publish to NPM
on:
release:
types:
- published
- created
jobs:
publish:
name: Publish to NPM
runs-on: ubuntu-latest
env:
RC_VERSION: ${{ steps.check_rc_version.outputs.rc_version }}

Check failure on line 14 in .github/workflows/publish-npmjs.yaml

View workflow run for this annotation

GitHub Actions / Publish to NPM

Invalid workflow file

The workflow is not valid. .github/workflows/publish-npmjs.yaml (Line: 14, Col: 19): Unrecognized named-value: 'steps'. Located at position 1 within expression: steps.check_rc_version.outputs.rc_version
steps:
- name: Check RC version
id: check_rc_version
run: echo "::set-output name=rc_version::$(echo ${{ github.event.release.tag_name }} | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+$' || echo 'false')"
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '14'
registry-url: 'https://registry.npmjs.org'
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '14' # You can adjust the Node.js version according to your needs
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install
- name: Bump Version
run: |
initialTag=${{ github.event.release.tag_name }}
tag="${initialTag//[v]/}"
./bump-version.sh $tag ${{ env.RC_VERSION }}
- name: Build library
run: npm run build
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
if [ "${{ env.RC_VERSION }}" == "true" ]; then
echo "🚀 Publishing RC version..."
./publish.sh --tag "${{ github.event.release.tag_name }}"
else
echo "🚀 Publishing regular version..."
./publish.sh
fi