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 #863 from bareos/dev/maik/master/rest_api_pypi
rest-api: add pypi packaging files
- Loading branch information
Showing
73 changed files
with
608 additions
and
431 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,49 @@ | ||
name: "[Release] bareos-restapi -> https://pypi.org/" | ||
|
||
on: | ||
push: | ||
tags: | ||
- Release/* | ||
|
||
jobs: | ||
build-and-publish: | ||
name: "Build bareos-restapi and publish it to https://pypi.org/" | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: "Checkout source" | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "Checkout tags" | ||
# for get-version.sh, an unshallow git checkout with tags is needed. | ||
run: git fetch --tag | ||
|
||
- name: "Set up Python" | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: "Build python package" | ||
run: | | ||
pip install --user wheel | ||
cd restapi | ||
# sdist mangles around with version information. | ||
# We replace ~pre with dev, as this will not be modified. | ||
# (pre will be replaced with rc). | ||
../docs/manuals/source/get-version.sh > bareos_restapi/VERSION.txt | ||
printf "Version: %s\n" $(cat bareos_restapi/VERSION.txt) | ||
python setup.py sdist bdist_wheel | ||
- name: "Create artifact" | ||
# creating an artifact is not required for publishing to pypi. | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: restapi/dist/ | ||
|
||
- name: "Publish to pypi.org" | ||
uses: pypa/gh-action-pypi-publish@v1.4.2 | ||
with: | ||
password: ${{ secrets.restapi_pypi_password }} | ||
packages_dir: python-bareos/dist/ |
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,59 @@ | ||
name: "bareos-restapi -> https://test.pypi.org/" | ||
|
||
# | ||
# build a bareos-restapi dev package | ||
# for every change in master, | ||
# affecting the relevant files. | ||
# | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- restapi/** | ||
- .github/workflows/publish_restapi_to_test-pypi.yml | ||
|
||
jobs: | ||
build-and-publish: | ||
name: "Build bareos-restapi and publish it to https://test.pypi.org/" | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: "Checkout source" | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "Checkout tags" | ||
# for get-version.sh, an unshallow git checkout with tags is needed. | ||
run: git fetch --tag | ||
|
||
- name: "Set up Python" | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: "Build python package" | ||
run: | | ||
pip install --user wheel | ||
cd restapi | ||
# sdist mangles around with version information. | ||
# We replace ~pre with dev, as this will not be modified. | ||
# (pre will be replaced with rc). | ||
../docs/manuals/source/get-version.sh > bareos_restapi/VERSION.txt | ||
printf "Version: %s\n" $(cat bareos_restapi/VERSION.txt) | ||
python setup.py sdist bdist_wheel | ||
- name: "Create artifact" | ||
# creating an artifact is not required for publishing to pypi. | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: restapi/dist/ | ||
|
||
- name: "Publish to test.pypi.org" | ||
uses: pypa/gh-action-pypi-publish@v1.4.2 | ||
with: | ||
repository_url: https://test.pypi.org/legacy/ | ||
password: ${{ secrets.restapi_test_pypi_password }} | ||
packages_dir: restapi/dist/ |
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
File renamed without changes.
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
Oops, something went wrong.