Merge branch '2-deploy-on-push-to-master' into 'master'

Resolve "deploy on push to master"

Closes #2

See merge request bslathi19/rtl-manifest!2
This commit is contained in:
Byron Lathi
2024-06-07 02:02:30 +00:00
3 changed files with 12 additions and 3 deletions

View File

@@ -21,14 +21,16 @@ test:
rules: rules:
- when: always - when: always
script: script:
- source init_env.sh
- echo "Haha no tests yet" - echo "Haha no tests yet"
deploy: deploy:
stage: deploy stage: deploy
rules: rules:
# only run on MRs to main # only run on MRs to main
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
# run on commits to main # run on commits to main
- if: $CI_COMMIT_BRANCH == "main" - if: $CI_COMMIT_BRANCH == "master"
script: script:
- source init_env.sh
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${PACKAGE_PROJECT_ID}/packages/pypi dist/* - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${PACKAGE_PROJECT_ID}/packages/pypi dist/*

View File

@@ -33,7 +33,9 @@ name = "rtl-manifest" # REQUIRED, is the only field that cannot be marked as dy
# #
# For a discussion on single-sourcing the version, see # For a discussion on single-sourcing the version, see
# https://packaging.python.org/guides/single-sourcing-package-version/ # https://packaging.python.org/guides/single-sourcing-package-version/
version = "0.0.2" # REQUIRED, although can be dynamic
dynamic = ["version"]
# version = "0.0.3" # REQUIRED, although can be dynamic
# This is a one-line description or tagline of what your project does. This # This is a one-line description or tagline of what your project does. This
# corresponds to the "Summary" metadata field: # corresponds to the "Summary" metadata field:

View File

@@ -1,4 +1,9 @@
from .rtl_manifest import rtl_manifest_main from .rtl_manifest import rtl_manifest_main
VERSION_BASE = "0.0.3"
import datetime
__version__ = f"{VERSION_BASE}.{datetime.datetime.now().strftime('%Y.%m.%d.%H%M')}"
def main(): def main():
rtl_manifest_main() rtl_manifest_main()