-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
D196: Generate release from tags (#197)
* D196: Generate release from tags * D196: Push to pyedb-docs when tags are created
- Loading branch information
Showing
1 changed file
with
63 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -89,7 +89,7 @@ jobs: | |
application_id: ${{ secrets.BOT_APPLICATION_ID }} | ||
application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }} | ||
|
||
- name: Deploy | ||
- name: Deploy dev docs | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/release-23.1' | ||
uses: JamesIves/[email protected] | ||
with: | ||
|
@@ -99,6 +99,16 @@ jobs: | |
folder: .tox/doc_out | ||
clean: true | ||
|
||
- name: Deploy release docs | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
uses: JamesIves/[email protected] | ||
with: | ||
repository-name: pyansys/pyedb-docs | ||
token: ${{ steps.get_workflow_token.outputs.token }} | ||
branch: gh-pages | ||
folder: .tox/doc_out | ||
clean: true | ||
|
||
build: | ||
name: Build library | ||
runs-on: ubuntu-latest | ||
|
@@ -144,3 +154,55 @@ jobs: | |
path: dist/pyedb.zip | ||
retention-days: 90 | ||
|
||
release: | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
needs: [build, tests, docs] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.7 | ||
|
||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@v3 | ||
|
||
- name: Display structure of downloaded files | ||
run: ls -R | ||
|
||
- name: Generate release notes | ||
uses: docker://pandoc/core:2.9 | ||
with: | ||
args: --output=dist/release_notes.md doc/source/api/release_notes.rst | ||
|
||
- name: Publish release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body_path: dist/release_notes.md | ||
files: ./**/pyedb.zip | ||
token: ${{ secrets.PYANSYS_PYEDB_BOT_TOKEN }} | ||
prerelease: true | ||
|
||
- name: Notify Success | ||
uses: skitionek/notify-microsoft-teams@master | ||
if: success() | ||
with: | ||
webhook_url: ${{ secrets.MS_TEAMS_PUBLIC }} | ||
needs: ${{ toJson(needs) }} | ||
job: ${{ toJson(job) }} | ||
steps: ${{ toJson(steps) }} | ||
overwrite: "{ | ||
title: `New release has been published!`, | ||
}" | ||
|
||
- name: Notify Failure | ||
uses: skitionek/notify-microsoft-teams@master | ||
if: failure() | ||
with: | ||
webhook_url: ${{ secrets.MS_TEAMS_DEV }} | ||
needs: ${{ toJson(needs) }} | ||
job: ${{ toJson(job) }} | ||
steps: ${{ toJson(steps) }} | ||
overwrite: "{ | ||
title: `Release FAILED!`, | ||
}" |