support salt tectonics #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: | |
- '*' | |
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 }}' |