mirror of
https://github.com/rendercv/rendercv.git
synced 2026-05-19 06:06:04 -04:00
Link docker and pypi releases (#321)
* Tie docker release to pypi release * minor updates --------- Co-authored-by: Sina Atalay <dev@atalay.biz>
This commit is contained in:
@@ -1,20 +1,58 @@
|
||||
name: Publish to Docker Hub
|
||||
name: Publish a Release
|
||||
|
||||
# GitHub events that triggers the workflow:
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
workflow_dispatch: # to make the workflow triggerable manually
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
call_tests_workflow:
|
||||
name: Test
|
||||
call_test_workflow:
|
||||
name: Run Tests
|
||||
uses: ./.github/workflows/test.yaml
|
||||
|
||||
push_to_registry:
|
||||
name: Release docker image
|
||||
publish_to_pypi:
|
||||
name: Publish to PyPI
|
||||
needs:
|
||||
- call_test_workflow
|
||||
runs-on: ubuntu-latest
|
||||
environment: release
|
||||
permissions:
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Hatch
|
||||
uses: pypa/hatch@install
|
||||
|
||||
- name: Check if the release tag matches the version
|
||||
uses: samuelcolvin/check-python-version@v4.1
|
||||
with:
|
||||
version_file_path: rendercv/__init__.py
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
hatch build
|
||||
|
||||
- name: Upload package to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
|
||||
- name: Upload wheel and source distribution
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
dist/*.whl
|
||||
dist/*.tar.gz
|
||||
|
||||
publish_to_dockerhub:
|
||||
name: Publish to Docker Hub
|
||||
needs:
|
||||
- publish_to_pypi
|
||||
runs-on: ubuntu-latest
|
||||
environment: release
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
@@ -52,3 +90,9 @@ jobs:
|
||||
subject-name: rendercv/rendercv
|
||||
subject-digest: ${{ steps.push.outputs.digest }}
|
||||
push-to-registry: true
|
||||
|
||||
call_update_files_workflow:
|
||||
name: Update files
|
||||
needs:
|
||||
- publish_to_pypi
|
||||
uses: ./.github/workflows/update-files.yaml
|
||||
58
.github/workflows/publish-to-pypi.yaml
vendored
58
.github/workflows/publish-to-pypi.yaml
vendored
@@ -1,58 +0,0 @@
|
||||
name: Publish to PyPI and update files
|
||||
|
||||
# GitHub events that triggers the workflow:
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
call_tests_workflow:
|
||||
name: Test
|
||||
uses: ./.github/workflows/test.yaml
|
||||
|
||||
publish:
|
||||
name: Publish to PyPI
|
||||
needs:
|
||||
- call_tests_workflow
|
||||
runs-on: ubuntu-latest
|
||||
environment: release
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Hatch
|
||||
uses: pypa/hatch@install
|
||||
|
||||
- name: Check if the release tag matches the version
|
||||
uses: samuelcolvin/check-python-version@v4.1
|
||||
with:
|
||||
version_file_path: rendercv/__init__.py
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
hatch build
|
||||
|
||||
- name: Upload package to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
|
||||
- name: Upload wheel and source distribution
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
dist/*.whl
|
||||
dist/*.tar.gz
|
||||
|
||||
call_update_files_workflow:
|
||||
name: Update files
|
||||
needs:
|
||||
- publish
|
||||
uses: ./.github/workflows/update-files.yaml
|
||||
2
.github/workflows/test.yaml
vendored
2
.github/workflows/test.yaml
vendored
@@ -25,8 +25,6 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Hatch
|
||||
uses: pypa/hatch@install
|
||||
|
||||
4
.github/workflows/update-files.yaml
vendored
4
.github/workflows/update-files.yaml
vendored
@@ -2,7 +2,7 @@ name: Update files
|
||||
|
||||
# GitHub events that triggers the workflow:
|
||||
on:
|
||||
workflow_call: # to make the workflow triggerable from other workflows (publish-to-pypi.yaml)
|
||||
workflow_call: # to make the workflow triggerable from other workflows (on-publish.yaml)
|
||||
workflow_dispatch: # to make the workflow triggerable manually
|
||||
|
||||
jobs:
|
||||
@@ -15,8 +15,6 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Hatch
|
||||
uses: pypa/hatch@install
|
||||
|
||||
Reference in New Issue
Block a user