Skip to content

Use poetry build system, update Python version to ^3.8 to include 3… #70

Use poetry build system, update Python version to ^3.8 to include 3…

Use poetry build system, update Python version to ^3.8 to include 3… #70

Workflow file for this run

name: graspologic Publish
on:
#
# When a release tag is created (e.g. v1.0.0), this workflow will be triggered. The `poetry dynamic-version` plugin will use the correct version tag.
#
release:
types: [created]
#
# On pushes to main and dev, a prerelease version will be cut for the branch. e.g. v1.0.0-pre.10+<hash>
#
push:
paths-ignore:
- '.all-contributorsrc'
- 'CONTRIBUTORS.md'
branches:
- 'main'
- 'dev'
jobs:
build:

Check failure on line 19 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / graspologic Publish

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yml (Line: 19, Col: 3): Error calling workflow 'microsoft/graspologic/.github/workflows/build.yml@915c26b20c7e6e4742a76293afccab7c208bab94'. The nested job 'static-code-analysis' is requesting 'actions: read, security-events: write', but is only allowed 'actions: none, security-events: none'.
uses: ./.github/workflows/build.yml
publish:
runs-on: ubuntu-latest
needs: build
if: github.ref=='refs/heads/main' || github.ref=='refs/heads/dev'
strategy:
matrix:
python-version: ["3.10"]
poetry-version: ["1.8.2"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v3.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
#
# This plugin will append version hashes unless we're on a release tag
#
- name: Add poetry-dynamic-versioning plugin
run: poetry self add "poetry-dynamic-versioning[plugin]"
- name: Install dependencies
run: poetry install
- name: Create version environment variable
run: |
echo "GRASPOLOGIC_VERSION=`poetry version --short`" >> $GITHUB_ENV
echo "GRASPOLOGIC_TAG=v`poetry version --short`" >> $GITHUB_ENV
- name: Build Artifacts
run: poetry build
# Note: need to set up a Trusted Publisher on PyPi
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist
skip-existing: true
verbose: true
- name: Download documentation artifact
uses: actions/download-artifact@v2
with:
name: documentation-site
path: docs/documentation-site
- name: Publish reference docs (dev branch)
uses: peaceiris/actions-gh-pages@v3
if: github.ref=='refs/heads/dev'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/documentation-site
destination_dir: pre-release
- name: Publish reference docs (main branch)
uses: peaceiris/actions-gh-pages@v3
if: github.ref=='refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/documentation-site
destination_dir: ${{ env.GRASPOLOGIC_VERSION }}
- name: Publish latest reference docs (main branch)
uses: peaceiris/actions-gh-pages@v3
if: github.ref=='refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/documentation-site
destination_dir: latest
- name: Create tag and GitHub release
uses: ncipollo/release-action@v1
if: github.ref=='refs/heads/main'
with:
tag: ${{ env.GRASPOLOGIC_TAG }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: versions_at_release.txt