Skip to content

Merge pull request #316 from ComputeCanada/usertf #55

Merge pull request #316 from ComputeCanada/usertf

Merge pull request #316 from ComputeCanada/usertf #55

Workflow file for this run

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.2.1
- 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 }}