From a267936aa5d5fea59ff8ab6680034a0c10594dd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oktay=20=C5=9Eenkan?= Date: Wed, 16 Oct 2024 23:05:33 +0300 Subject: [PATCH] ci(.github): add changesets ci action --- .github/workflows/ci.yml | 3 +++ .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 904b174..0377169 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,5 +17,8 @@ jobs: - name: Setup uses: ./.github/actions/setup + - name: Clean + run: yarn clean + - name: Build all packages and apps run: yarn build \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2f52183 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Release + +on: + push: + branches: [main] + +jobs: + release: + if: github.repository == 'oktaysenkan/monicon' + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup + uses: ./.github/actions/setup + + - name: Clean + run: yarn clean + + - name: Build all packages and apps + run: yarn build + + - name: Create Release Pull Request or Publish to npm + uses: changesets/action@v1 + with: + publish: yarn release + version: yarn version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file