-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description Automatically deploy Docker image, pip package, docs after publishing releases. ## Impact on users using Chronovoyage Active update of the app.
- Loading branch information
1 parent
60f3463
commit 207585d
Showing
4 changed files
with
79 additions
and
23 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
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
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,32 @@ | ||
name: Publish Pip Package | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
tag: | ||
type: string | ||
required: true | ||
|
||
env: | ||
app-name: "chronovoyage" | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
environment: release | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download assets | ||
uses: robinraju/release-downloader@v1 | ||
with: | ||
tag: ${{ inputs.tag }} | ||
fileName: ${{ env.app-name }}-* | ||
out-file-path: dist | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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 |
---|---|---|
@@ -1,26 +1,43 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: | ||
- published | ||
|
||
permissions: | ||
contents: read | ||
env: | ||
app-name: "chronovoyage" | ||
|
||
jobs: | ||
publish: | ||
check-tag-name-exists: | ||
runs-on: ubuntu-latest | ||
environment: release | ||
permissions: | ||
id-token: write | ||
if: ${{ github.event.release.tag_name != '' }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- run: "true" | ||
|
||
- name: Install Hatch | ||
uses: pypa/hatch@install | ||
publish-pip-package: | ||
needs: check-tag-name-exists | ||
uses: ./.github/workflows/publish-pip-package.yml | ||
with: | ||
tag: ${{ github.event.release.tag_name }} | ||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
- name: Build Package | ||
run: hatch build -c | ||
publish-docker-image: | ||
needs: check-tag-name-exists | ||
uses: ./.github/workflows/publish-docker-image.yml | ||
with: | ||
tag: ${{ github.event.release.tag_name }} | ||
permissions: | ||
contents: read | ||
packages: write | ||
attestations: write | ||
id-token: write | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
publish-docs: | ||
needs: check-tag-name-exists | ||
uses: ./.github/workflows/publish-docs.yml | ||
permissions: | ||
contents: read | ||
id-token: write |