Skip to content

Publish module

Publish module #7

Workflow file for this run

name: "Publish module"
on:
workflow_dispatch:
jobs:
create-github-release:
name: Deploy GitHub Release
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
clean: true
fetch-depth: 0
- name: Get Version
id: gv
run: |
echo "ver=$(jq --raw-output .version metadata.json)" >> $GITHUB_OUTPUT
- name: Create release
id: create_release
run: |
gh release create v${{ steps.gv.outputs.ver }} --title v${{ steps.gv.outputs.ver }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy-forge:
name: Deploy to Forge
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
clean: true
- name: "PDK Build"
uses: docker://puppet/pdk:2.1.0.0
with:
args: 'build'
- name: "Push to Forge"
uses: docker://puppet/pdk:2.1.0.0
with:
args: 'release publish --forge-token ${{ secrets.FORGE_API_KEY }} --force'