From f4b668f63dd902323096991db69208eca2d1e1ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rui=20Sim=C3=A3o?= Date: Wed, 21 Feb 2024 12:48:54 +0000 Subject: [PATCH] chore: add missing github action --- .github/workflows/release.yaml | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..8c2afe0 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,49 @@ +name: Release + +on: + push: + paths: + - '.changeset/**' + - 'packages/**' + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout branch + uses: actions/checkout@v3 + + - name: Install + uses: ./.github/common-actions/install + + - name: Build + run: pnpm build + + - name: Create Release Pull Request or Publish to NPM + id: changesets + uses: changesets/action@v1 + with: + publish: pnpm release + title: 'ci(changesets): :package: version packages' + commit: 'ci(changesets): version packages' + setupGitUser: false + env: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} + NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create @dev release + if: steps.changesets.outputs.published != 'true' + run: | + git checkout main + pnpm version:dev + pnpm release:dev + env: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}