v1.3.1 #10
Workflow file for this run
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
name: Release Pygls to PyPI | |
on: | |
release: | |
types: [published] | |
jobs: | |
relase: | |
name: "🚀 Release 🚢" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ssh-key: ${{secrets.CI_RELEASE_DEPLOY_KEY}} | |
fetch-depth: 0 | |
- name: Use Python "3.10" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Generate the latest changelog | |
uses: orhun/git-cliff-action@v2 | |
id: git-cliff | |
with: | |
config: cliff.toml | |
args: --verbose --latest | |
env: | |
OUTPUT: git-cliff-changes.tmp.md | |
- name: Update the changelog | |
run: | | |
git checkout main | |
cat git-cliff-changes.tmp.md | sed -i "3r /dev/stdin" CHANGELOG.md | |
git config --global user.name 'Github Action' | |
git config --global user.email 'github.action@users.noreply.github.com' | |
git add CHANGELOG.md | |
git commit -m "chore: update CHANGELOG.md" | |
git push | |
- name: Update CONTRIBUTORS.md | |
run: | | |
git checkout main | |
poetry install | |
poetry run poe generate_contributors_md | |
if [[ $(git diff --stat CONTRIBUTORS.md) != '' ]]; then | |
git add CONTRIBUTORS.md | |
git commit -m "chore: update CONTRIBUTORS.md" | |
git push | |
fi | |
- name: Release | |
run: | | |
poetry build | |
poetry publish --username "__token__" --password ${{ secrets.PYPI_API_TOKEN }} |