Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GitHub release #276

Merged
merged 8 commits into from
Mar 15, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 33 additions & 18 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:
doc-artifact-name: Documentation-html

Release:
if: contains(github.ref, 'refs/tags') && github.event_name == 'push'
needs: doc-deploy-dev
# if: contains(github.ref, 'refs/tags') && github.event_name == 'push'
needs: integration_checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -71,28 +71,43 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: Documentation-pdf
path: ~/dist

- name: "Deploy stable documentation"
uses: pyansys/actions/doc-deploy-stable@v4
- uses: actions/download-artifact@v3
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
doc-artifact-name: Documentation-html
name: Documentation-html
path: ~/dist

- name: "Compressing HTML documentation"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need to explicitely zip artifacts, if you mark a folder for upload then it should be zipped by default

Copy link
Contributor Author

@ludovicsteinbach ludovicsteinbach Mar 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't downloading it unzip it then?

Edit: I think I misunderstood you. Do you mean the artifact should be zipped already or when using the release action pointing it at a folder should zip it?

uses: vimtor/action-zip@v1.1
with:
files: ~/dist/Documentation-html
dest: ~/dist/documentation-html.zip

# - name: "Deploy stable documentation"
# uses: pyansys/actions/doc-deploy-stable@v4
# with:
# cname: ${{ env.DOCUMENTATION_CNAME }}
# token: ${{ secrets.GITHUB_TOKEN }}
# doc-artifact-name: Documentation-html

# note how we use the PyPI tokens
- name: Upload to PyPI
run: |
pip install twine
twine upload --non-interactive --skip-existing ~/**/*.whl
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
# # note how we use the PyPI tokens
# - name: Upload to PyPI
# run: |
# pip install twine
# twine upload --non-interactive --skip-existing ~/**/*.whl
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably these three additions will be removed before merge.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed

tag_name: v1.1.3b0
draft: true
generate_release_notes: true
files: |
~/**/*.whl
./**/*.zip
./**/*.pdf
~/dist/*.whl
~/dist/documentation-html.zip
~/dist/*.pdf