Merge pull request #323 from ComputeCanada/bump9 #56
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@main | |
- name: Retrieve tag name | |
id: tag_name | |
run: | | |
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} | |
- uses: hashicorp/setup-terraform@v1 | |
with: | |
terraform_version: 1.4.0 | |
- name: Create tarballs and zips | |
if: startsWith(github.ref, 'refs/tags/') | |
run: ./release.sh $(git describe --tags --abbrev=0) | |
- name: Generate Changelog | |
env: | |
SOURCE_TAG: ${{ steps.tag_name.outputs.SOURCE_TAG }} | |
run: | | |
sed -n "/^## \[${SOURCE_TAG}\]/,/^## \[/p" CHANGELOG.md | sed '1d;2d;$d' | sed '$d' | sed 's/###/##/' > ${SOURCE_TAG}-CHANGELOG.txt | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Magic Castle ${{ steps.tag_name.outputs.SOURCE_TAG }} | |
body_path: ${{ steps.tag_name.outputs.SOURCE_TAG }}-CHANGELOG.txt | |
draft: true | |
files: | | |
releases/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |