diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..38fa9a7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Publish Widget +on: + push: + branches: [main] + paths: ["widget/**"] + workflow_dispatch: +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "pnpm" + registry-url: "https://registry.npmjs.org" + - name: Install PNPM + run: npm install -g pnpm + - name: Install dependencies + run: pnpm install + - name: Publish + run: ./scripts/publish.sh + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/README.md b/README.md index 107cdc7..5617119 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,25 @@ To configure the demo, create a `.env` file in the `/demo` directory: VITE_API_TOKEN=your_api_token_here ``` +## Publishing + +This repository is configured to publish to npmjs.org whenever: + +1. There is an update to the main branch. +2. A new version is created in the `package.json`. + +To create a new version, you can use the following command: + +```bash +pnpm version +``` + +and then push those changes to the main branch. Don't forget the tags! + +```bash +git push origin main --tags && git push +``` + ## License This software is proprietary and confidential. Commercial terms apply. Please see [LICENSE.txt](LICENSE.txt) for details or contact Airbyte, Inc. for licensing information. diff --git a/demo/index.html b/demo/index.html index 8707902..1f9854f 100644 --- a/demo/index.html +++ b/demo/index.html @@ -26,7 +26,7 @@

Airbyte Widget Demo