From 2cb25d88887e82f27ccd989db74c91ff1a551b22 Mon Sep 17 00:00:00 2001 From: Konstantin Ignatov Date: Thu, 12 Mar 2026 16:37:34 +0100 Subject: [PATCH 1/3] Add build-dist CI flow to build and push the library to branch main-dist when code is pushed to main. --- .github/workflows/build-dist.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build-dist.yml diff --git a/.github/workflows/build-dist.yml b/.github/workflows/build-dist.yml new file mode 100644 index 0000000..42487f9 --- /dev/null +++ b/.github/workflows/build-dist.yml @@ -0,0 +1,31 @@ +name: Build dist + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build + + - name: Push dist to main-dist branch + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git checkout -B main-dist + git add -f dist/ + git commit -m "chore: build dist from main [skip ci]" + git push origin main-dist --force \ No newline at end of file From 91eec43d825ee15ae5767a141fd8d3fd33d4e72b Mon Sep 17 00:00:00 2001 From: Konstantin Ignatov Date: Thu, 12 Mar 2026 16:41:33 +0100 Subject: [PATCH 2/3] Update permissions --- .github/workflows/build-dist.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-dist.yml b/.github/workflows/build-dist.yml index 42487f9..54e0c0d 100644 --- a/.github/workflows/build-dist.yml +++ b/.github/workflows/build-dist.yml @@ -8,6 +8,8 @@ on: jobs: build: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v4 From 59252fb212104c4ba644d83f55a58936c6ba4f08 Mon Sep 17 00:00:00 2001 From: Konstantin Ignatov Date: Thu, 12 Mar 2026 16:43:28 +0100 Subject: [PATCH 3/3] Add new line at the end of the file --- .github/workflows/build-dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-dist.yml b/.github/workflows/build-dist.yml index 54e0c0d..f577108 100644 --- a/.github/workflows/build-dist.yml +++ b/.github/workflows/build-dist.yml @@ -30,4 +30,4 @@ jobs: git checkout -B main-dist git add -f dist/ git commit -m "chore: build dist from main [skip ci]" - git push origin main-dist --force \ No newline at end of file + git push origin main-dist --force