From 23595621bf079b64b3c92f94b8cb87a47568633f Mon Sep 17 00:00:00 2001 From: Mikhail Golbakh Date: Mon, 29 Jul 2024 09:47:31 +0300 Subject: [PATCH] ci: add release and ci workflows --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/release.yml | 17 +++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0e8c881 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + branches: + - main + - next + pull_request: + branches: + - '**' + +jobs: + precommit: + name: Precommit checks + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + - name: Install Packages + run: npm ci + - name: Lint Files + run: npm run lint + - name: Typecheck + run: npm run typecheck diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..845ded9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,17 @@ +name: Release + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Release from ${{ github.ref_name }} + uses: gravity-ui/release-action@v1 + with: + node-version: 18 + github-token: ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }} + npm-token: ${{ secrets.GRAVITY_UI_BOT_NPM_TOKEN }}