Skip to content

Commit

Permalink
D196: Generate release from tags (#197)
Browse files Browse the repository at this point in the history
* D196: Generate release from tags

* D196: Push to pyedb-docs when tags are created
  • Loading branch information
hiro727 authored Dec 2, 2022
1 parent 747b5b2 commit 5f8fd52
Showing 1 changed file with 63 additions and 1 deletion.
64 changes: 63 additions & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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!`,
}"

0 comments on commit 5f8fd52

Please sign in to comment.