Skip to content

v0.1.11

v0.1.11 #5

Workflow file for this run

name: 'Publish latest release'
on:
release:
types: [released]
jobs:
publish-packages:
name: Publish ${{ matrix.package }} (Latest)
runs-on: ubuntu-latest
strategy:
matrix:
package: [react, vanilla]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 22
registry-url: https://registry.npmjs.org/
cache: 'npm'
- name: Build packages
run: |
npm ci
npm run build-packages
# This step is currently not really necessary, but it will be needed if we use the vanilla package in the react package
- name: Publish package
working-directory: ./packages/${{ matrix.package }}
run: |
CURRENT_VERSION=$(npm view ./ version)
echo "Current version: $CURRENT_VERSION"
RELEASE_VERSION=$CURRENT_VERSION
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
RELEASE_VERSION=$RELEASE_VERSION npm run build
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}