Skip to content

Upload Package

Upload Package #23

Workflow file for this run

# This workflows will build, test and upload the package to npm when a release
# is created.
# To create a release, please follow the steps documented in the "Build &
# Publish" section of the README.md file.
name: Test Upload Package
on:
push:
tags:
- test[0-9]+.[0-9]+.[0-9]+
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Stop early if the tag fails any validation
run: sh validate-version.sh ${{ github.ref_name }} || true
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- name: Build and bundle
run: |
npx nx build web-component
npx nx bundle web-component
npx nx build ngx-web-component
- name: Fix the relative URLs in the READMEs to work on npmjs
run: |
sed -i 's/(\.\.\/web-component)/(web-component)/g' dist/packages/ngx-web-component/README.md
sed -i 's/(test-data\//(https:\/\/github.com\/ReadAlongs\/Studio-Web\/blob\/${{ github.ref_name }}\/packages\/web-component\/test-data\//g' dist/packages/web-component/README.md
- name: show the updated readmes
run: |
echo dist/packages/web-component/README.md
cat dist/packages/web-component/README.md
echo dist/packages/ngx-web-component/README.md
cat dist/packages/ngx-web-component/README.md