-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from biocypher/cicd_release_generation
Cicd release generation
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "*" | ||
# TODO: ensure semver style - "[0-9]+.[0-9]+.[0-9]+(-[a-z]+)?(.[0-9]+)?" | ||
|
||
jobs: | ||
# call-tests_and_code_quality: | ||
# if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
# uses: "./.github/workflows/tests_and_code_quality.yaml" | ||
|
||
build_and_deploy_artifact: | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
# needs: call-tests_and_code_quality | ||
runs-on: ubuntu-latest | ||
env: | ||
PYTHON_VERSION: 3.9 | ||
# environment: | ||
# name: release | ||
# url: https://upload.pypi.org/legacy/ | ||
permissions: | ||
id-token: write | ||
contents: write | ||
steps: | ||
#---------------------------------------------- | ||
# check-out repo and set-up python and poetry | ||
#---------------------------------------------- | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Python and Poetry | ||
uses: biocypher/biocypher/.github/actions/setup@main | ||
#---------------------------------------------- | ||
# install dependencies | ||
#---------------------------------------------- | ||
- name: Install dependencies | ||
uses: biocypher/biocypher/.github/actions/install@main | ||
#---------------------------------------------- | ||
# build artifact | ||
#---------------------------------------------- | ||
# - name: Build artifact | ||
# run: poetry build | ||
#---------------------------------------------- | ||
# upload to PyPi | ||
#---------------------------------------------- | ||
#- name: Publish artifact to PyPI | ||
# uses: pypa/gh-action-pypi-publish@release/v1 | ||
# with: | ||
# repository-url: https://upload.pypi.org/legacy/ | ||
#---------------------------------------------- | ||
# create Github release | ||
#---------------------------------------------- | ||
- name: Create Github release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref_name }} | ||
run: | | ||
gh release create "$tag" \ | ||
--repo="$GITHUB_REPOSITORY" \ | ||
--title="$tag" \ | ||
--generate-notes |