Skip to content

Merge pull request #22 from equinor/add_vitrinite_reflectance #15

Merge pull request #22 from equinor/add_vitrinite_reflectance

Merge pull request #22 from equinor/add_vitrinite_reflectance #15

Workflow file for this run

# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: build and publish
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]'
permissions:
id-token: write
contents: write
jobs:
test1d:
uses: equinor/warmth/.github/workflows/python-test.yml@main
with:
event_type: ${{ github.event_name}}
action_type: ${{ github.event.action}}
snyk:
uses: equinor/warmth/.github/workflows/snyk.yml@main
secrets:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
GITHUB_TOKEN_WORKFLOW: ${{ secrets.GITHUB_TOKEN }}
deploy:
needs: [test1d, snyk]
environment: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: 'main'
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install dependencies
run: |
curl -sSL https://install.python-poetry.org | python3
poetry install --with dev --no-interaction
- name: Update version (kept at 0.0.0) in pyproject.toml and build
run: |
poetry version ${{ github.ref_name }}
poetry build
- name: Mint token
id: mint
uses: tschm/[email protected]
- name: Publish the package with poetry
run: |
poetry publish -u __token__ -p '${{ steps.mint.outputs.api-token }}'