From 427360ad619f437b1959cb21cdd688386c8ec383 Mon Sep 17 00:00:00 2001 From: paanSinghCoder Date: Mon, 19 Feb 2024 11:00:35 +0530 Subject: [PATCH] workflow setup --- .changeset/shiny-cheetahs-float.md | 5 +++++ .github/workflows/main.yml | 21 +++++++++++++++++++ .github/workflows/publish.yml | 33 ++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 .changeset/shiny-cheetahs-float.md create mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/publish.yml diff --git a/.changeset/shiny-cheetahs-float.md b/.changeset/shiny-cheetahs-float.md new file mode 100644 index 0000000..8ffbfb4 --- /dev/null +++ b/.changeset/shiny-cheetahs-float.md @@ -0,0 +1,5 @@ +--- +"async-localstorage": patch +--- + +Initial commit diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..341af3d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,21 @@ +name: CI +on: + push: + branches: + - "**" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 7 + - uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: "pnpm" + + - run: pnpm install --frozen-lockfile + - run: pnpm run lint && pnpm run build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..97601b2 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +name: Publish +on: + workflow_run: + workflows: [CI] + branches: [main] + types: [completed] + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +permissions: + contents: write + pull-requests: write + +jobs: + publish: + if: ${{ github.event.workflow_run.conclusion == 'success' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 7 + - uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: "pnpm" + + - run: pnpm install --frozen-lockfile + - name: Create Release Pull Request or Publish + id: changesets + uses: changesets/action@v1 + with: + publish: pnpm run build