Skip to content

Commit

Permalink
prep release action: dont use shared workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Jan 9, 2025
1 parent 7fe77c1 commit 674bd6d
Showing 1 changed file with 44 additions and 5 deletions.
49 changes: 44 additions & 5 deletions .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,48 @@ on:
description: 'Module version to be released. Must be a valid semver string without leading v. (1.2.3)'
required: true

env:
BUNDLE_WITHOUT: development:test:system_tests
BUNDLE_WITH: release
GIT_AUTHOR_NAME: Release Automation
GIT_AUTHOR_EMAIL: "${{ github.repository_owner }}@users.noreply.github.com"
BLACKSMITH_FULL_VERSION: "${{ inputs.version }}"

jobs:
release_prep:
uses: 'voxpupuli/gha-puppet/.github/workflows/prepare_release.yml@prep'
with:
version: ${{ github.event.inputs.version }}
secrets: 'inherit'
prepare_release:
name: 'Prepare Release'
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.base-branch }}
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: bundle environment
run: |
bundle env
bundle list
- name: Update metadata.json to new version
run: |
if [[ -n BLACKSMITH_FULL_VERSION ]] ; then
bundle exec rake module:bump:full
else
bundle exec rake module:bump
fi
- name: Prepare the release
env:
# https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bundle exec rake release:prepare
- name: Create pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: "Release ${{ inputs.version }}"
branch: release-prep
delete-branch: true
title: "Release ${{ inputs.version }}"
labels: skip-changelog

0 comments on commit 674bd6d

Please sign in to comment.