Skip to content

Commit d05982d

Browse files
committed
(CONT-941) Add release workflows
Prior to this commit, provision didn't have the release_prep or release workflows. This commit adds them.
1 parent 05b07d3 commit d05982d

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/workflows/auto_release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: "Auto release"
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
release_prep:
8+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@main"
9+
secrets: "inherit"

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "Module Release"
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
release:
8+
name: "Release"
9+
runs-on: "ubuntu-latest"
10+
if: github.repository_owner == 'puppetlabs'
11+
12+
steps:
13+
14+
- name: "Checkout"
15+
uses: "actions/checkout@v3"
16+
with:
17+
ref: "${{ github.ref }}"
18+
clean: true
19+
fetch-depth: 0
20+
21+
- name: "Get version"
22+
id: "get_version"
23+
run: |
24+
echo "version=$(jq --raw-output .version metadata.json)" >> $GITHUB_OUTPUT
25+
26+
- name: "PDK build"
27+
uses: "docker://puppet/pdk:nightly"
28+
with:
29+
args: "build"
30+
31+
- name: "Create release"
32+
run: |
33+
gh release create v${{ steps.get_version.outputs.version }} --title v${{ steps.get_version.outputs.version }}
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)