From 18dec31247b1703e66dcc48300fd3568839760d5 Mon Sep 17 00:00:00 2001 From: ibro Date: Tue, 7 May 2024 22:29:22 +0100 Subject: [PATCH] edit github actions --- .github/workflows/main.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/publish.yml | 5 ++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..946222b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,29 @@ +name: Check commit +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + with: + version: 8 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Run checks + run: pnpm checks + + - name: Build + run: pnpm build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9406f77..16fd6d8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,11 +22,14 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile + - name: Run checks + run: pnpm check && pnpm build + - name: Create Release Pull Request or Publish id: changesets uses: changesets/action@v1 with: - publish: pnpm ci:publish + publish: pnpm publish -r --dry-run env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}