diff --git a/.github/release-please-config.json b/.github/release-please-config.json new file mode 100644 index 0000000..dc066f0 --- /dev/null +++ b/.github/release-please-config.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "bootstrap-sha": "359539fdd65b3a8849f7ea783cddc700c399c78c", + "include-component-in-tag": false, + "include-v-in-tag": false, + "draft-pull-request": true, + "packages": { + ".": { + "release-type": "simple", + "package-name": "hetzner.hcloud", + "changelog-path": "changelogs/dev-changelog.md", + "extra-files": ["galaxy.yml", "plugins/module_utils/version.py"] + } + } +} diff --git a/.github/release-please-manifest.json b/.github/release-please-manifest.json new file mode 100644 index 0000000..adb1dfd --- /dev/null +++ b/.github/release-please-manifest.json @@ -0,0 +1 @@ +{".":"2.4.1"} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index c74e6ba..a5b035c 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -1,9 +1,8 @@ +name: Release-please + on: push: - branches: - - main - -name: release-please + branches: [main] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -11,31 +10,17 @@ concurrency: jobs: release-please: - # The secret HCLOUD_BOT_TOKEN is only available on the main repo, not in forks. + # Do not run on forks. if: github.repository == 'ansible-collections/hetzner.hcloud' runs-on: ubuntu-latest - outputs: - pr-updated: ${{ steps.outputs.outputs.pr-updated }} - branch: ${{ steps.outputs.outputs.branch }} - version: ${{ steps.outputs.outputs.version }} - steps: - id: release - uses: google-github-actions/release-please-action@v3 + uses: google-github-actions/release-please-action@v4 with: token: ${{ secrets.HCLOUD_BOT_TOKEN }} - release-type: simple - package-name: hetzner.hcloud - include-v-in-tag: false - draft-pull-request: true - - # We use antsibull-changelog for the actual user-facing changelog. - changelog-path: changelogs/dev-changelog.md - - extra-files: | - galaxy.yml - plugins/module_utils/version.py + config-file: .github/release-please-config.json + manifest-file: .github/release-please-manifest.json - name: Prepare outputs id: outputs @@ -45,10 +30,16 @@ jobs: echo "branch=${{ fromJSON(steps.release.outputs.pr).headBranchName }}" >> "$GITHUB_OUTPUT" echo "version=$(echo "${{ fromJSON(steps.release.outputs.pr).title }}" | awk '{print $3}')" >> "$GITHUB_OUTPUT" + outputs: + pr-updated: ${{ steps.outputs.outputs.pr-updated }} + branch: ${{ steps.outputs.outputs.branch }} + version: ${{ steps.outputs.outputs.version }} + antsibull-changelog: - runs-on: ubuntu-latest needs: [release-please] if: needs.release-please.outputs.pr-updated + + runs-on: ubuntu-latest steps: - name: Setup python uses: actions/setup-python@v5