From d05982d1eb3bd3bc074454d4497bf07713829433 Mon Sep 17 00:00:00 2001 From: Gavin Patton Date: Fri, 28 Apr 2023 13:58:57 +0100 Subject: [PATCH] (CONT-941) Add release workflows Prior to this commit, provision didn't have the release_prep or release workflows. This commit adds them. --- .github/workflows/auto_release.yml | 9 ++++++++ .github/workflows/release.yml | 35 ++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/auto_release.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/auto_release.yml b/.github/workflows/auto_release.yml new file mode 100644 index 0000000..d6270c5 --- /dev/null +++ b/.github/workflows/auto_release.yml @@ -0,0 +1,9 @@ +name: "Auto release" + +on: + workflow_dispatch: + +jobs: + release_prep: + uses: "puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@main" + secrets: "inherit" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e8d2736 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: "Module Release" + +on: + workflow_call: + +jobs: + release: + name: "Release" + runs-on: "ubuntu-latest" + if: github.repository_owner == 'puppetlabs' + + steps: + + - name: "Checkout" + uses: "actions/checkout@v3" + with: + ref: "${{ github.ref }}" + clean: true + fetch-depth: 0 + + - name: "Get version" + id: "get_version" + run: | + echo "version=$(jq --raw-output .version metadata.json)" >> $GITHUB_OUTPUT + + - name: "PDK build" + uses: "docker://puppet/pdk:nightly" + with: + args: "build" + + - name: "Create release" + run: | + gh release create v${{ steps.get_version.outputs.version }} --title v${{ steps.get_version.outputs.version }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}