ci: create github release on merge to live #1
Workflow file for this run
This file contains hidden or 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 GitHub release | |
on: [push] | |
# on: | |
# push: | |
# branches: | |
# - live | |
jobs: | |
create-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install local package | |
run: pip install . | |
- name: Extract version | |
run: | | |
VERSION=$(python -c "import importlib.metadata; print(importlib.metadata.version('oc4ids-datastore-pipeline'))") | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Print version | |
run: echo $VERSION | |
- name: Create tag | |
run: | | |
git tag "v${VERSION}" | |
git push origin "v${VERSION}" | |
- name: Create release | |
run: | | |
gh release create "v${VERSION}" \ | |
--repo="${GITHUB_REPOSITORY}" \ | |
--title="${VERSION}" \ | |
--generate-notes |