Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Merge pull request #25 from powersync-ja/readme-updates #29

Merge pull request #25 from powersync-ja/readme-updates

Merge pull request #25 from powersync-ja/readme-updates #29

Workflow file for this run

name: Release
on:
push:
branches:
- main
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
- name: Setup PNPM
run: |
npm install -g pnpm@8
echo "PNPM version: $(pnpm -v)"
- name: Setup NPMRC
run: |
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm build:packages
- id: is_dev
run: |
IS_DEV=${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/changeset-release/main' }}
echo "value=$IS_DEV" >> $GITHUB_OUTPUT
- name: Publish dev packages
if: ${{ steps.is_dev.outputs.value == 'true' }}
run: |
pnpm changeset version --no-git-tag --snapshot dev
pnpm changeset publish --tag next
- name: Create Release Pull Request or Publish to npm
if: ${{ steps.is_dev.outputs.value == 'false' }}
id: changesets
uses: changesets/action@v1
with:
version: pnpm ci:version
commit: 'chore: update versions'
title: '[Chore] update versions'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish production components.
if: ${{ github.ref == 'refs/heads/main' && steps.changesets.outputs.hasChangesets == 'false' }}
run: pnpm ci:publish