diff --git a/.github/workflows/pypipublish.yml b/.github/workflows/pypipublish.yml index 034c916..5b5701e 100644 --- a/.github/workflows/pypipublish.yml +++ b/.github/workflows/pypipublish.yml @@ -5,25 +5,37 @@ on: types: [published] jobs: - deploy: + build-package: + name: Build & verify package runs-on: ubuntu-latest + permissions: + id-token: write + attestations: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: hynek/build-and-inspect-python-package@v2 + with: + attest-build-provenance-github: 'true' + + deploy: + name: Publish to pypi.org environment: name: pypi - url: https://pypi.org/project/emoji/ + url: https://test.pypi.org/p/test-emoji456 + runs-on: ubuntu-latest + needs: build-package permissions: id-token: write + attestations: write steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade build wheel - - name: Build package - run: | - python -m build - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@v1.8.14 + - name: Download package built by build-and-inspect-python-package + uses: actions/download-artifact@v4 + with: + name: Packages + path: dist + - name: Upload package to PyPI + uses: pypa/gh-action-pypi-publish@v1.10.1 + with: + repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/updateGithubPages.yml b/.github/workflows/updateGithubPages.yml index 9b472a0..e92f8a6 100644 --- a/.github/workflows/updateGithubPages.yml +++ b/.github/workflows/updateGithubPages.yml @@ -1,4 +1,4 @@ -name: updateGithubPages +name: Update GithubPages documentation on: workflow_dispatch: diff --git a/test.py b/test.py deleted file mode 100644 index 26c8eef..0000000 --- a/test.py +++ /dev/null @@ -1,14 +0,0 @@ - -import emoji - -assert 'es' not in emoji.EMOJI_DATA[emoji.emojize(':lion:')] - - -def repl(x, value): - print(x) - print(value) - print(value['es']) - - - -emoji.replace_emoji('🦁', replace=repl)