Discord Emojis Version 1734426241812 #37
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 | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "discord_emojis/_version.py" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Extract version | |
id: extract_version | |
run: | | |
version=$(python -c "import discord_emojis; print(discord_emojis.__version__)") | |
echo "version=$version" >> $GITHUB_OUTPUT | |
- name: Build package | |
run: | | |
pip install build | |
python -m build | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- name: Create GitHub release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ steps.extract_version.outputs.version }} | |
tag_name: ${{ steps.extract_version.outputs.version }} |