Skip to content

Commit

Permalink
Merge pull request #11 from AfterShip-Team-Mocha/master
Browse files Browse the repository at this point in the history
feat: added github action config file.
  • Loading branch information
AfterShip-Team-Mocha authored Jan 13, 2025
2 parents 9f272ab + dc0a55e commit b5895de
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This code was auto generated by AfterShip SDK Generator.
# Do not edit the class manually.

name: Release to PyPI

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python # Set Python version
uses: actions/setup-python@v3
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip poetry
poetry config virtualenvs.in-project --unset
make install
- name: Build
run: |
make build
- name: Format
run: |
make format
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.get_version.outputs.VERSION }}
path: dist

- name: Release to PyPI
run: |
pip install twine
twine upload -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --verbose dist/*

0 comments on commit b5895de

Please sign in to comment.