diff --git a/.github/workflows/v5-tests-and-release.yml b/.github/workflows/v5-tests-and-release.yml index f319166..f7e906d 100644 --- a/.github/workflows/v5-tests-and-release.yml +++ b/.github/workflows/v5-tests-and-release.yml @@ -1,5 +1,12 @@ name: "[v5] Test and Release" -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: permissions: read-all jobs: check-v4-compatibility: @@ -381,10 +388,15 @@ jobs: shell: bash release: + if: | + github.event_name == 'schedule' || + github.event_name == 'workflow_dispatch' || + (github.event_name == 'push' && github.ref == 'refs/heads/main') runs-on: ubuntu-latest permissions: contents: write issues: write + pull-requests: write id-token: write packages: write concurrency: @@ -397,6 +409,9 @@ jobs: - name: Checkout uses: actions/checkout@v7 - name: Release this GitHub Action - uses: rlespinasse/release-that@v1 + uses: cycjimmy/semantic-release-action@v4 with: - github-token: ${{ secrets.GH_TOKEN }} + semantic_version: 21 + branches: main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..7bf05ec --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,8 @@ +{ + "branches": ["main"], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/github" + ] +}