Showing with 79 additions and 161 deletions.
  1. +12 −0 .github/workflows/ci.yml
  2. +58 −34 .github/workflows/release.yml
  3. 0 .github/workflows/{auto_release.yml → release_prep.yml}
  4. +0 −126 .github/workflows/spec.yml
  5. +8 −0 CHANGELOG.md
  6. +1 −1 metadata.json
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "ci"

on:
pull_request:
branches:
- "main"
workflow_dispatch:

jobs:
Spec:
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
secrets: "inherit"
92 changes: 58 additions & 34 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,71 @@
name: "Publish module"
# This is a generic workflow for releasing a Puppet module.
# It requires that the caller sets `secrets: inherit` to ensure
# that secrets are visible from steps in this workflow.
name: "Module Release"

on:
workflow_dispatch:

jobs:
create-github-release:
name: Deploy GitHub Release
runs-on: ubuntu-20.04
release:
name: "Release"
runs-on: "ubuntu-latest"
if: github.repository_owner == 'TraGicCode'

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: "Set up Ruby"
uses: "actions/setup-ruby@v1"
with:
ruby-version: "3.1"

- name: "Checkout"
uses: "actions/checkout@v4"
with:
ref: ${{ github.ref }}
ref: "${{ github.ref }}"
clean: true
fetch-depth: 0
- name: Get Version
id: gv

- name: "Get version"
id: "get_version"
run: |
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
- name: Create Release
uses: actions/create-release@v1
id: create_release
ruby <<-EOF >> $GITHUB_OUTPUT
require "json"
version = JSON.parse(File.read("metadata.json"))["version"]
# from https://github.com/voxpupuli/metadata-json-lint/blob/b5e68049c6be58aa63263357bb0dcad8635a6829/lib/metadata-json-lint/schema.rb#L141-L150
numeric = '(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)' # Major . Minor . Patch
pre = '(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?' # Prerelease
build = '(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?' # Build
full = numeric + pre + build
semver_regex = /\A#{full}\Z/
if version&.match?(semver_regex)
puts "version=#{version}"
else
raise "Version #{version} is invalid. Exiting workflow."
end
EOF
- name: "PDK build"
uses: "docker://puppet/pdk:nightly"
with:
args: "build"

- name: "Generate release notes"
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: "Create release"
run: |
gh release create v${{ steps.get_version.outputs.version }} --title v${{ steps.get_version.outputs.version }} -F OUTPUT.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ steps.gv.outputs.ver }}"
draft: false
prerelease: false

deploy-forge:
name: Deploy to Forge
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
clean: true
- name: "PDK Build"
uses: docker://puppet/pdk:nightly
with:
args: 'build'
- name: "Push to Forge"
uses: docker://puppet/pdk:nightly
- name: "Publish module"
uses: "docker://puppet/pdk:nightly"
with:
args: 'release publish --forge-token ${{ secrets.FORGE_API_KEY }} --force'
args: 'release publish --forge-token ${{ secrets.FORGE_API_KEY }} --force'
File renamed without changes.
126 changes: 0 additions & 126 deletions .github/workflows/spec.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).

## [v3.5.0](https://github.com/TraGicCode/tragiccode-azure_key_vault/tree/v3.5.0) - 2024-10-29

[Full Changelog](https://github.com/TraGicCode/tragiccode-azure_key_vault/compare/v3.4.0...v3.5.0)

### Added

- (GH-132) Update all github workflows to match puppetlabs [#133](https://github.com/TraGicCode/tragiccode-azure_key_vault/pull/133) ([TraGicCode](https://github.com/TraGicCode))

## [v3.4.0](https://github.com/TraGicCode/tragiccode-azure_key_vault/tree/v3.4.0) - 2024-10-29

[Full Changelog](https://github.com/TraGicCode/tragiccode-azure_key_vault/compare/v3.3.0...v3.4.0)
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tragiccode-azure_key_vault",
"version": "3.4.0",
"version": "3.5.0",
"author": "tragiccode",
"summary": "The azure_key_vault module allows you to easily fetch secrets securely within your puppet manifests.",
"license": "Apache-2.0",
Expand Down