This repository has been archived by the owner on Oct 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update ci for use conventional commits, create release and publ…
…ish package
- Loading branch information
Showing
4 changed files
with
71 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Conventional Commit Parser | ||
on: | ||
pull_request: | ||
branches: [main, master, develop] | ||
types: [opened, reopened, edited, review_requested, synchronize] | ||
|
||
jobs: | ||
conventional_commit: | ||
name: Conventional Commits | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: webiny/[email protected] |
This file was deleted.
Oops, something went wrong.
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,57 @@ | ||
name: Create Release and publish pypi package | ||
on: | ||
push: | ||
tags: | ||
- v[0-9]+.[0-9]+.* | ||
|
||
jobs: | ||
released: | ||
name: Released | ||
if: github.ref_type == 'tag' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout git repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Automated Version Bump | ||
id: changelog | ||
uses: Requarks/changelog-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{github.ref_name}} | ||
writeToFile: 'false' | ||
|
||
- name: Get variables | ||
id: get_variables | ||
run: | | ||
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
echo ::set-output name=IS_PRERELEASE::"${{contains(github.ref, 'dev')}}" | ||
- name: Publish release github | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
prerelease: ${{ steps.get_variables.outputs.IS_PRERELEASE }} | ||
tag_name: ${{ steps.get_variables.outputs.VERSION }} | ||
body: ${{ steps.changelog.outputs.changes }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install dependencies and ANTLR requirements | ||
run: | | ||
sudo apt-get install antlr4 | ||
pip install twine build | ||
- name: Compile | ||
run: make build | ||
|
||
- name: Build and publish python package | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python3 -m build | ||
twine upload dist/* |
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