Skip to content

chore: release

chore: release #19

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: Upload Package
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
test:
uses: ./.github/workflows/end-to-end-tests.yml
secrets: inherit
build:
runs-on: ubuntu-20.04
needs: test
steps:
- uses: actions/checkout@v4
- name: Stop early if the tag fails any validation
run: sh validate-version.sh ${{ github.ref_name }}
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
scope: "@readalongs"
- 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: Publish web-component to npmjs
run: |
cd dist/packages/web-component && npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish ngx-web-component to npmjs
run: |
cd dist/packages/ngx-web-component && npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changes }}