-
Notifications
You must be signed in to change notification settings - Fork 7
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 #217 from swyddfa/develop
New release v0.0.6
- Loading branch information
Showing
82 changed files
with
2,817 additions
and
1,258 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Docs Build | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
paths: | ||
- 'arlunio/**' | ||
- 'docs/**' | ||
- '.github/workflows/docs-release.yml' | ||
pull_request: | ||
branches: | ||
- develop | ||
paths: | ||
- 'arlunio/**' | ||
- 'docs/**' | ||
- '.github/workflows/docs-release.yml' | ||
jobs: | ||
Build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v1 | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Setup Environment | ||
run: | | ||
python --version | ||
python -m pip install --upgrade pip | ||
python -m pip install -e .[doc] | ||
python -m pip install -r docs/requirements.txt | ||
- name: Build Docs | ||
run: | | ||
cd docs | ||
make html | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@releases/v3 | ||
with: | ||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
BASE_BRANCH: develop | ||
BRANCH: gh-pages | ||
FOLDER: docs/_build/html | ||
TARGET_FOLDER: docs/ | ||
if: github.event_name != 'pull_request' |
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 |
---|---|---|
@@ -1,54 +1,71 @@ | ||
name: Python Release | ||
|
||
# <trigger> | ||
on: | ||
# <trigger-push> | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
paths: | ||
- 'arlunio/**' | ||
- 'docs/using/tutorial/**' | ||
- 'tests/**' | ||
- 'docs/users/**' | ||
- 'setup.py' | ||
- 'pyproject.toml' | ||
- 'MANIFEST.in' | ||
# </trigger> | ||
# </trigger-push> | ||
# <trigger-cron> | ||
schedule: | ||
- cron: '0 2 * * *' | ||
# </trigger-cron> | ||
|
||
jobs: | ||
# <release-job> | ||
Release: | ||
runs-on: ubuntu-latest | ||
# </release-job> | ||
steps: | ||
# <release-job-setup> | ||
|
||
# <release-job-check> | ||
- uses: actions/checkout@v1 | ||
|
||
- name: 'Should Release?' | ||
id: dorel | ||
run: | | ||
if [[ "$REF" = 'refs/heads/develop' ]]; then | ||
./scripts/should-release.sh | ||
else | ||
echo "::set-output name=should_release::true" | ||
fi | ||
env: | ||
REF: ${{github.ref}} | ||
# </release-job-check> | ||
|
||
# <release-job-setup> | ||
- name: Setup Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
if: steps.dorel.outputs.should_release | ||
|
||
- name: Setup Environment | ||
run: | | ||
python --version | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade tox | ||
if: steps.dorel.outputs.should_release | ||
# </release-job-setup> | ||
|
||
# <release-job-version> | ||
- name: Get Version Number | ||
uses: einaregilsson/build-number@v1 | ||
with: | ||
token: ${{secrets.github_token}} | ||
if: github.ref == 'refs/heads/develop' | ||
if: github.ref == 'refs/heads/develop' && steps.dorel.outputs.should_release | ||
|
||
- name: Set Version Number | ||
shell: bash | ||
run : | | ||
sed -i 's/"\(.*\)"/"\1b'"${BUILD_NUMBER}"'"/' arlunio/_version.py | ||
cat arlunio/_version.py | ||
if: github.ref == 'refs/heads/develop' | ||
if: github.ref == 'refs/heads/develop' && steps.dorel.outputs.should_release | ||
|
||
# </release-job-version> | ||
|
||
|
@@ -64,12 +81,14 @@ jobs: | |
echo "::set-env name=RELEASE_DATE::$release_date" | ||
echo "::set-output name=RELEASE_DATE::$release_date" | ||
if: steps.dorel.outputs.should_release | ||
# </release-job-info> | ||
|
||
# <release-job-pkg> | ||
- name: Build Package | ||
run: | | ||
tox -e pkg | ||
if: steps.dorel.outputs.should_release | ||
# </release-job-pkg> | ||
|
||
# <release-job-assets> | ||
|
@@ -81,6 +100,7 @@ jobs: | |
src=$(find dist/ -name '*.tar.gz' -exec basename {} \;) | ||
echo "::set-output name=SRC::$src" | ||
if: steps.dorel.outputs.should_release | ||
# </release-job-assets> | ||
|
||
# <release-job-tag> | ||
|
@@ -99,6 +119,7 @@ jobs: | |
EOF | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: steps.dorel.outputs.should_release | ||
# </release-job-tag> | ||
|
||
# <release-job-create> | ||
|
@@ -112,6 +133,7 @@ jobs: | |
release_name: V${{ steps.info.outputs.VERSION}} - ${{ steps.info.outputs.RELEASE_DATE }} | ||
draft: false | ||
prerelease: ${{ github.ref == 'refs/heads/develop' }} | ||
if: steps.dorel.outputs.should_release | ||
# </release-job-create> | ||
|
||
# <release-job-upload> | ||
|
@@ -124,6 +146,7 @@ jobs: | |
asset_path: dist/${{ steps.pkg.outputs.WHL }} | ||
asset_name: ${{ steps.pkg.outputs.WHL }} | ||
asset_content_type: application/octet-stream | ||
if: steps.dorel.outputs.should_release | ||
|
||
- name: Upload Release Asset | ||
uses: actions/[email protected] | ||
|
@@ -134,11 +157,35 @@ jobs: | |
asset_path: dist/${{ steps.pkg.outputs.SRC }} | ||
asset_name: ${{ steps.pkg.outputs.SRC }} | ||
asset_content_type: application/octet-stream | ||
if: steps.dorel.outputs.should_release | ||
# </release-job-upload> | ||
|
||
# <release-job-notes> | ||
- name: Upload Release Notes | ||
shell: bash | ||
run: | | ||
python -m pip install towncrier docutils | ||
./scripts/write-release-notes.sh $VERSION > release-notes.html | ||
notes=$(cat release-notes.html) | ||
echo $notes | ||
curl -s -X PATCH https://api.github.com/repos/${{ github.repository }}/releases/${{ steps.release.outputs.id }} \ | ||
-H "Authorization: token $GITHUB_TOKEN" \ | ||
-d @- << EOF | ||
{ | ||
"body": "$notes" | ||
} | ||
EOF | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: steps.dorel.outputs.should_release | ||
# </release-job-notes> | ||
|
||
# <release-job-pypi> | ||
- name: Publish to PyPi | ||
run: | | ||
python -m pip install twine | ||
twine upload dist/* -u alcarney -p ${{ secrets.PYPI_PASS }} | ||
if: steps.dorel.outputs.should_release | ||
# </release-job-pypi> |
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 |
---|---|---|
|
@@ -37,5 +37,6 @@ | |
"editor.rulers": [ | ||
79 | ||
] | ||
} | ||
}, | ||
"restructuredtext.linter.disabled": true | ||
} |
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.