diff --git a/.autorc b/.autorc index 0eaaa15..38ff8b7 100644 --- a/.autorc +++ b/.autorc @@ -8,7 +8,12 @@ } ], "all-contributors", - "conventional-commits", + [ + "conventional-commits", + { + "defaultReleaseType": "patch" + } + ], "first-time-contributor", "released" ], @@ -17,12 +22,23 @@ "name": "Aman Varshney", "email": "amanvarshney.work@gmail.com", "baseBranch": "main", + "onlyPublishWithReleaseLabel": false, "labels": [ { "name": "skip-release", "changelogTitle": "⚠️ Pushed to `main`", "description": "Skip a release and only update the changelog", "releaseType": "skip" + }, + { + "name": "internal", + "changelogTitle": "🏠 Internal", + "releaseType": "patch" + }, + { + "name": "documentation", + "changelogTitle": "📝 Documentation", + "releaseType": "patch" } ] } diff --git a/.github/workflows/canary.yaml b/.github/workflows/canary.yaml new file mode 100644 index 0000000..b383f7f --- /dev/null +++ b/.github/workflows/canary.yaml @@ -0,0 +1,35 @@ +name: Canary Release + +on: + pull_request: + types: [opened, synchronize] + +jobs: + canary: + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.head_ref }} + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install Dependencies + run: bun install --frozen-lockfile + + - name: Build CLI + run: bun run build:cli + + - name: Create Canary Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + BTS_TELEMETRY: 1 + run: bun auto canary diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8385071..e4b164c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,7 +4,6 @@ on: push: branches: - main - pull_request: jobs: release: @@ -13,9 +12,14 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} - name: Prepare repository - run: git fetch --unshallow --tags + run: | + git fetch --unshallow --tags + git checkout main - name: Setup Bun uses: oven-sh/setup-bun@v2 diff --git a/lerna.json b/lerna.json index f0b7b86..714b1ac 100644 --- a/lerna.json +++ b/lerna.json @@ -5,11 +5,13 @@ "publish": { "conventionalCommits": true, "message": "chore(release): publish", - "verifyAccess": false + "verifyAccess": false, + "allowBranch": ["main"] }, "version": { "conventionalCommits": true, - "message": "chore(release): version" + "message": "chore(release): version", + "allowBranch": ["main"] } }, "packages": [