Skip to content

Release 1.1.0

Release 1.1.0 #2

Workflow file for this run

name: Publish on Github and PyPi
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build-package:
name: Build Python package
runs-on: ubuntu-latest
env:
cache-key: build_cache
steps:
- name: Checkout current code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Restore Cache
id: python-restore
uses: actions/cache/restore@v3
with:
path: /opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages
key: ${{ env.cache-key }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Upload artifacts
uses: actions/upload-artifact@master
with:
name: python-files
path: dist/
retention-days: 1
publish-github:
name: Create a release on Github
runs-on: ubuntu-latest
needs: build-package
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@master
with:
name: python-files
path: dist/
- name: Publish on Github
uses: ncipollo/release-action@v1
with:
makeLatest: true
artifacts: dist/*
artifactErrorsFailBuild: true
publish-pypi:
name: Publish on PyPi
runs-on: ubuntu-latest
needs: publish-github
permissions:
id-token: write
actions: write
steps:
- name: Download artifacts
uses: actions/download-artifact@master
with:
name: python-files
path: dist/
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT }}
repository: prochy-exe/subsplease-scraper
event-type: new_release