From e9af57a561b376fa693c6c20e64b3c656254510a Mon Sep 17 00:00:00 2001 From: youtous Date: Fri, 12 Jan 2024 15:20:38 +0100 Subject: [PATCH] add initial release workflow --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ CHANGELOG.md | 12 ++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 CHANGELOG.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..134c5185a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +--- +name: release + +on: + push: + tags: + - "v*.*.*" + + workflow_run: + workflows: ["pre-commit"] + branches: [main] + types: + - completed + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install go (required for Changelog parsing) + uses: actions/setup-go@v4 + + - name: Parse CHANGELOG.md + run: | + GO111MODULE=on go install github.com/rcmachado/changelog@0.7.0 + changelog show "$GITHUB_REF_NAME" > ${{ github.workspace }}-CHANGELOG.txt + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + body_path: ${{ github.workspace }}-CHANGELOG.txt diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..d0f5fca9a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v-0.0.1](https://github.com/ansible/product-demos/-/tree/v-0.0.1) - 2024-01-12 + +### Added + +- Initial release ([1af584b4ea6d77812bfcb2f6474fee6ee1b13666](https://github.com/ansible/product-demos/-/commit/1af584b4ea6d77812bfcb2f6474fee6ee1b13666))