Github Tag and Release #60
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: Github Tag and Release | |
on: | |
workflow_run: | |
workflows: ["Publish new PyPi build version"] | |
types: | |
- completed | |
jobs: | |
tag_and_release: | |
name: Github tag and release | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v2 | |
- name: Install toml-cli | |
run: cargo install toml-cli | |
- name: Extract version | |
id: extract_version | |
run: | | |
dbtcoves_version=$(toml get pyproject.toml tool.poetry.version) | |
echo "::set-output name=dbtcoves_version::$dbtcoves_version" | |
- name: Generate tag version | |
id: concat_version | |
run: | | |
previous_output="${{ steps.extract_version.outputs.dbtcoves_version }}" | |
final_version="v${previous_output//\"/}" | |
echo "::set-output name=final_version::${final_version}" | |
- name: Github tag and release | |
uses: avakar/tag-and-release@v1 | |
with: | |
tag_name: ${{ steps.concat_version.outputs.final_version }} | |
release_name: ${{ steps.concat_version.outputs.final_version }} |