Skip to content

Commit

Permalink
ci: update release-please-action to v4 (#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
jooola authored Dec 19, 2023
1 parent 4e3f89a commit 1e6e3a0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 23 deletions.
15 changes: 15 additions & 0 deletions .github/release-please-config.json
Original file line number Diff line number Diff line change
@@ -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"]
}
}
}
1 change: 1 addition & 0 deletions .github/release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{".":"2.4.1"}
37 changes: 14 additions & 23 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,26 @@
name: Release-please

on:
push:
branches:
- main

name: release-please
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

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
Expand All @@ -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
Expand Down

0 comments on commit 1e6e3a0

Please sign in to comment.