Skip to content

feat: .tsx file type support #6

feat: .tsx file type support

feat: .tsx file type support #6

Workflow file for this run

name: release
on:
push:
branches:
- main
jobs:
build:
name: Build package
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: setup python
uses: actions/setup-python@v2
- name: Install dependencies
run: python -m pip install --upgrade pip setuptools wheel build
- name: Build a binary wheel and a source tarball
run: python -m build
- name: copy version file and changelog
run: |-
cp version.txt dist/version.txt
cp CHANGELOG.md dist/changelog.md
- name: Upload artifact
uses: actions/upload-artifact@v2.1.1
with:
name: dist
path: dist
release_github:
name: Publish to GitHub Releases
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Release
run: gh release create v$(cat dist/version.txt) -R ${{ github.repository }} -F
dist/changelog.md -t v$(cat dist/version.txt)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release_pypi:
name: Publish package to PyPI
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: remove version file and changelog
run: |-
rm dist/version.txt
rm dist/changelog.md
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USER }}
password: ${{ secrets.PYPI_API_TOKEN }}