Joseph Manley
7f16f4e6d7
Fix versioning Fix artifact name Use artifact value as input fix output name Update workflows
58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
name: Publish Release
|
|
on:
|
|
release:
|
|
types:
|
|
- created
|
|
|
|
jobs:
|
|
pypi:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Set up Python 3.9
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.9
|
|
- name: Update Version
|
|
run: |
|
|
echo "Setting version to: ${GITHUB_REF:10}"
|
|
sed -i "s/[0-9.]*\.[0-9.]*\.[0-9.]*/${GITHUB_REF:10}/g" jira_tracker/__init__.py
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
- name: build
|
|
run: |
|
|
python setup.py sdist bdist_wheel
|
|
- name: PyPi Publish
|
|
uses: pypa/gh-action-pypi-publish@v1.0.0a0
|
|
with:
|
|
user: __token__
|
|
password: ${{ secrets.PYPI_TOKEN }}
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Set up Python 3.9
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.9
|
|
- name: Update Version
|
|
run: |
|
|
echo "Setting version to: ${GITHUB_REF:10}"
|
|
sed -i "s/[0-9.]*\.[0-9.]*\.[0-9.]*/${GITHUB_REF:10}/g" jira_tracker/__init__.py
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
- name: Build
|
|
id: build
|
|
run: |
|
|
python setup.py sdist
|
|
echo "::set-output name=artifact::dist/jira-tracker-${GITHUB_REF:10}.tar.gz"
|
|
- name: Upload to release
|
|
uses: JasonEtco/upload-to-release@v0.1.1
|
|
with:
|
|
args: ${{ steps.build.outputs.artifact }} application/tar+gzip
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |