Skip to content

v1.2.1

v1.2.1 #1

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- name: Install Poetry
uses: snok/install-poetry@v1.3.3
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: true
- name: Set up Python
id: python
uses: actions/setup-python@v4
with:
python-version: '3.x'
cache: poetry
- name: Install dependencies
if: steps.python.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install library
run: poetry install --no-interaction
- name: Build
run: poetry build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: package
path: dist/
retention-days: 7
if-no-files-found: error
pypi:
needs: [build]
runs-on: ubuntu-latest
permissions:
id-token: write
environment:
name: pypi-publishing
url: https://pypi.org/project/hvac/
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: package
path: dist
- name: Show tree
run: tree
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
asset:
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: package
path: dist
- name: Show tree
run: tree
- name: Add release asset
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
tag_name: ${{ github.event.release.tag_name }}
fail_on_unmatched_files: true
files: |
dist/*