Skip to content

chore(deps): update github artifact actions (major) #461

chore(deps): update github artifact actions (major)

chore(deps): update github artifact actions (major) #461

Workflow file for this run

name: Distribution
on: [push, pull_request]
jobs:
linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-setup-${{ hashFiles('**/requirements*.txt') }}
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: 3.8
- name: Install Gammu
run: |
sudo apt-get update
sudo apt-get install -y libgammu-dev libdbd-sqlite3
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
pip install -r requirements-test.txt
- name: build
run: python ./setup.py sdist
- name: twine
run: twine check dist/*
- name: Store the binary wheel
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: python-package-distributions
path: dist
windows:
runs-on: windows-latest
strategy:
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
architecture: [x64, x86]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-setup-${{ hashFiles('**/requirements*.txt') }}
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Install Gammu x64
if: ${{ matrix.architecture == 'x64' }}
run: |
C:/msys64/usr/bin/wget.exe -O gammu-setup.exe https://dl.cihar.com/gammu/releases/windows/Gammu-1.41.0-Windows-64bit.exe
./gammu-setup.exe /S /D=C:/Gammu
- name: Install Gammu x86
if: ${{ matrix.architecture == 'x86' }}
run: |
C:/msys64/usr/bin/wget.exe -O gammu-setup.exe https://dl.cihar.com/gammu/releases/windows/Gammu-1.41.0-Windows.exe
./gammu-setup.exe /S /D=C:/Gammu
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
pip install -r requirements-test.txt
- name: build
run: python ./setup.py bdist_wheel
- name: twine
run: twine check dist/*
- name: Store the binary wheel
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: python-package-distributions
path: dist
publish:
runs-on: ubuntu-20.04
needs:
- linux
- windows
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Download all the dists
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
with:
name: python-package-distributions
path: dist/
- name: Publish package
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2
with:
user: __token__
password: ${{ secrets.pypi_password }}