Skip to content

Commit 837e896

Browse files
author
Anton Benkevich
committed
Add github release creation
1 parent 2bfb1e6 commit 837e896

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/stage4_release_pypi.yml renamed to .github/workflows/stage3_release_artefacts.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Test and release
4+
name: Test and release to PyPi and GitHub
55

66
on:
77
push:
@@ -49,3 +49,25 @@ jobs:
4949
run: |
5050
python setup.py sdist bdist_wheel
5151
twine upload --skip-existing dist/*
52+
- name: Build GH release assets
53+
run: |
54+
cd alsdkdefs/apis; zip -r ../../AlertLogicOpenAPIDefinitions.zip .; cd ../..
55+
- name: Create GH Release
56+
id: create_release
57+
uses: actions/create-release@v1
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
with:
61+
tag_name: ${{ github.ref }}
62+
draft: false
63+
prerelease: false
64+
- name: Upload Release Asset
65+
id: upload-release-asset
66+
uses: actions/upload-release-asset@v1
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
with:
70+
upload_url: ${{ steps.create_release.outputs.upload_url }}
71+
asset_path: ./AlertLogicOpenAPIDefinitions.zip
72+
asset_name: AlertLogicOpenAPIDefinitions.zip
73+
asset_content_type: application/zip

0 commit comments

Comments
 (0)