Skip to content

Fix Windows command #23

Fix Windows command

Fix Windows command #23

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
# Adapted from: https://github.com/pypa/gh-action-pypi-publish#usage
pypi-publish:
name: Build, Lint, Test, Release to PyPI
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/project/plover-1password/
permissions:
id-token: write
steps:
- name: Clone Repository
uses: actions/checkout@v3
- name: Load SSH key into GitHub for 1Password Python SDK install
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.PLOVER_1PASSWORD_PRIVATE_KEY }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Test, Coverage, Lint, Type Checking Dependencies
run: |
python -m pip install --editable ".[test]"
python -m pip install git+ssh://git@github.com/1Password/onepassword-sdk-python.git@v0.1.1
- name: Run Linter
run: pylint plover_1password
- name: Run Type Checker
run: mypy plover_1password
- name: Run Tests
run: pytest
- name: Run Coverage
run: |
coverage run --module pytest
coverage report --show-missing
- name: Install Build
run: python -m pip install --upgrade build
- name: Build
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
github-release:
name: GitHub Release
runs-on: ubuntu-latest
needs:
- pypi-publish
if: always() && needs.pypi-publish.result == 'success'
permissions:
contents: write
steps:
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
gh release create "$TAG" \
--repo="$GITHUB_REPOSITORY" \
--title="$TAG" \
--generate-notes