diff --git a/.github/.keep b/.github/.keep index 368cc6e..c118d61 100644 --- a/.github/.keep +++ b/.github/.keep @@ -1 +1 @@ -# keep +1758043113 diff --git a/.github/workflows/auto-merge-dependabot.yml b/.github/workflows/auto-merge-dependabot.yml index d5f8880..e680c04 100644 --- a/.github/workflows/auto-merge-dependabot.yml +++ b/.github/workflows/auto-merge-dependabot.yml @@ -1,23 +1,16 @@ name: auto-merge-dependabot on: - pull_request: - types: [opened, synchronize, ready_for_review, labeled] + pull_request_target: + types: [opened, synchronize, reopened, ready_for_review] permissions: contents: write pull-requests: write jobs: automerge: - if: github.actor == 'dependabot[bot]' + if: ${{ github.actor == 'dependabot[bot]' }} runs-on: ubuntu-latest steps: - - name: Fetch metadata - id: meta - uses: dependabot/fetch-metadata@v2 + - uses: ahmadnassri/action-dependabot-auto-merge@v3 with: + target: minor github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Enable auto-merge (squash) for non-major - if: steps.meta.outputs.update-type != 'version-update:semver-major' - uses: peter-evans/enable-pull-request-automerge@v3 - with: - pull-request-number: ${{ github.event.pull_request.number }} - merge-method: squash diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 3cc74cb..06e13c1 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -1,18 +1,22 @@ name: publish-pypi on: release: - types: [published] + types: [published] # se dispara cuando semantic-release crea el release + workflow_dispatch: # tambiƩn manual si lo necesitas permissions: - contents: read id-token: write + contents: read jobs: - publish: - environment: pypi + build-and-publish: runs-on: ubuntu-latest + environment: pypi steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: { python-version: '3.12' } - - run: python -m pip install -U pip build + - run: python -m pip install --upgrade pip build - run: python -m build - - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Publish to PyPI (OIDC) + uses: pypa/gh-action-pypi-publish@release/v1 + with: + skip-existing: true diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index 70e3fe0..5c9c016 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -4,19 +4,22 @@ on: branches: [main] permissions: contents: write + issues: write pull-requests: write - id-token: write jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: { fetch-depth: 0 } - - uses: actions/setup-python@v5 - with: { python-version: '3.12' } - - run: python -m pip install -U pip - - run: python -m pip install python-semantic-release==9.* build - - name: Run semantic-release (no PyPI upload) + - uses: actions/setup-node@v4 + with: { node-version: '20' } + - uses: cycjimmy/semantic-release-action@v4 + with: + extra_plugins: | + @semantic-release/commit-analyzer + @semantic-release/release-notes-generator + @semantic-release/changelog + @semantic-release/github env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: semantic-release version && semantic-release publish + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..e3c917f --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,10 @@ +{ + "branches": ["main"], + "tagFormat": "v${version}", + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + ["@semantic-release/changelog", { "changelogFile": "CHANGELOG.md" }], + "@semantic-release/github" + ] +}