-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update workflow to build package wheel Create automated releases
- Loading branch information
1 parent
579cf81
commit e78ddd9
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 |
---|---|---|
|
@@ -34,3 +34,67 @@ jobs: | |
- name: Analyse with pylint | ||
run: | | ||
cd iriscasttools && pylint --recursive yes test iriscasttools | ||
build_wheel: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
python-version: ["3.x"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel | ||
- name: Build Wheels | ||
run: cd iriscasttools && python setup.py bdist_wheel | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: iriscasttools | ||
path: iriscasttools/dist | ||
if-no-files-found: error | ||
|
||
publish: | ||
runs-on: ubuntu-20.04 | ||
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | ||
needs: | ||
- test_and_lint | ||
- build_wheel | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Download Wheels | ||
id: download | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: iriscasttools | ||
path: iriscasttools/dist | ||
|
||
- name: Get Package Version | ||
id: version | ||
run: echo "version=$(python iriscasttools/setup.py --version)" >> $GITHUB_ENV | ||
|
||
- name: Make Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: iriscasttools/dist/* | ||
tag: ${{ env.version }} | ||
name: iriscasttools-${{ env.version }} | ||
skipIfReleaseExists: true | ||
|