Skip to content

Release to Puppet Forge #9

Release to Puppet Forge

Release to Puppet Forge #9

Workflow file for this run

name: "Release to Puppet Forge"
on: "workflow_dispatch"
jobs:
test:
uses: "./.github/workflows/ci.yml"
release:
runs-on: "ubuntu-latest"
needs: "test"
steps:
- uses: "actions/checkout@v4"
- name: "get version"
id: "get_version"
run: |
echo "version=`jq --raw-output .version metadata.json`" >> $GITHUB_OUTPUT
- name: "pdk build"
uses: "docker://puppet/pdk:3.0.0.0"
with:
args: "build"
- name: "gh changelog get --latest"
run: |
export GH_HOST=github.com
gh extension install chelnak/gh-changelog
gh changelog get --latest > OUTPUT.md
env:
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: "gh release create"
run: |
gh release create v${{ steps.get_version.outputs.version }} --title v${{ steps.get_version.outputs.version }} -F OUTPUT.md
env:
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: "pdk publish"
uses: "docker://puppet/pdk:3.0.0.0"
with:
args: "release publish --forge-token ${{ secrets.FORGE_API_KEY }} --force"