upgrade (Breaking-Change): Updated WhenMade enums for Year 2025 #36
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
# GitHub CI build pipeline | |
name: Etsy Package Build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
cd etsy_python | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Run package creation | |
run: | | |
python -m pip install --user --upgrade build | |
python -m build | |
- name: Archive package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: etsy-python | |
path: ./dist/ | |
publish-to-pypi: | |
name: >- | |
Publish Python π distribution π¦ to PyPI | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/etsy-python | |
permissions: | |
id-token: write | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v3 | |
with: | |
name: etsy-python | |
path: ./dist/ | |
- name: Publish distribution π¦ to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
github-release: | |
name: >- | |
Sign the Python π distribution π¦ with Sigstore | |
and upload them to GitHub Release | |
needs: | |
- publish-to-pypi | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v3 | |
with: | |
name: etsy-python | |
path: ./dist/ | |
- name: Sign the dists with Sigstore | |
uses: sigstore/gh-action-sigstore-python@v3.0.0 | |
with: | |
inputs: >- | |
./dist/*.tar.gz | |
./dist/*.whl | |
- name: Create GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: | | |
COMMIT_SUBJECT=$(git log -1 --pretty=%s) | |
COMMIT_BODY=$(git log -1 --pretty=%b) | |
CURRENT_DATE=$(date +'%Y-%m-%d') | |
RELEASE_NAME="${COMMIT_SUBJECT} (${CURRENT_DATE})" | |
# Create the release using the combined name and commit body as notes | |
gh release create \ | |
"$RELEASE_NAME" \ | |
--repo "${{ github.repository }}" \ | |
--notes "$COMMIT_BODY" | |
- name: Upload artifact signatures to GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: | | |
COMMIT_SUBJECT=$(git log -1 --pretty=%s) | |
CURRENT_DATE=$(date +'%Y-%m-%d') | |
RELEASE_NAME="${COMMIT_SUBJECT} (${CURRENT_DATE})" | |
# Upload artifacts to the GitHub Release | |
gh release upload \ | |
"$RELEASE_NAME" \ | |
dist/** \ | |
--repo "${{ github.repository }}" |