Skip to content

Update build deps (#60) #55

Update build deps (#60)

Update build deps (#60) #55

Workflow file for this run

name: 'Publish alpha releases'
on:
push:
branches:
- main
jobs:
publish:
name: Publish packages to NPM (Alpha)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 22
registry-url: https://registry.npmjs.org/
- name: Set hash and version variable
run: |
echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Build packages
run: |
npm ci
npm run build:packages
- name: Publish React package
working-directory: ./packages/react
run: |
echo "Preparing to publish vanilla package"
echo "VERSION=$(npm view ./ version)" >> $GITHUB_ENV
echo "RELEASE_VERSION=$(npm view ./ version)-alpha.$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "VERSION: ${{ env.VERSION }}"
echo "COMMIT_HASH: ${{ env.COMMIT_HASH }}"
echo "RELEASE_VERSION: ${{ env.RELEASE_VERSION }}"
# npm version ${{ env.VERSION }}-alpha.${{ env.COMMIT_HASH }} --no-git-tag-version
# npm publish --tag alpha --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish vanilla package
working-directory: ./packages/vanilla
run: |
echo "Preparing to publish vanilla package"
echo "VERSION=$(npm view ./ version)" >> $GITHUB_ENV
echo "RELEASE_VERSION=$(npm view ./ version)-alpha.$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "VERSION: ${{ env.VERSION }}"
echo "COMMIT_HASH: ${{ env.COMMIT_HASH }}"
echo "RELEASE_VERSION: ${{ env.RELEASE_VERSION }}"
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}