Skip to content

add get version

add get version #1

Workflow file for this run

name: Release
on:
push:
branches: ["master", "environment/*"]
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version
run: |
version=$(cat pyproject.toml | grep -m 1 "^version =" | awk '{print $3}' | sed 's/"//g')
echo "Version: [$version]"
echo "version=$version" >> $GITHUB_OUTPUT
# Deploy-Dev:
# runs-on: ubuntu-latest
# needs: Build
# environment:
# name: "dev"
# url: "https://github.com"
# steps:
# - name: "no-op"
# run: echo "NO-OP"
# Deploy-Staging:
# runs-on: ubuntu-latest
# needs: Deploy-Dev
# environment:
# name: "staging"
# url: "https://github.com"
# steps:
# - name: "no-op"
# run: echo "NO-OP"
# Deploy-Prod:
# runs-on: ubuntu-latest
# needs: Deploy-Staging
# environment:
# name: "prod"
# url: "https://github.com"
# steps:
# - name: "no-op"
# run: echo "NO-OP"