v0.1.2 #6
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
name: release-main | |
on: | |
push: | |
tags: | |
- "v*" | |
release: | |
types: [published] | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
publish: | |
name: Publish on PyPI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- name: Set up the environment | |
uses: ./.github/actions/setup-poetry-env | |
- name: Export tag | |
id: vars | |
run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT | |
- name: Build and publish | |
run: | | |
source .venv/bin/activate | |
echo $PYPI_TOKEN | |
poetry config pypi-token.pypi $PYPI_TOKEN | |
poetry run invoke publish --rule $RELEASE_VERSION | |
env: | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
RELEASE_VERSION: ${{ steps.vars.outputs.tag }} | |
- name: Build Changelog | |
id: github_release | |
uses: mikepenz/release-changelog-builder-action@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# docker: | |
# needs: publish | |
# name: Build container | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: "☁️ checkout repository" | |
# uses: actions/checkout@v2 | |
# - name: "🔧 setup buildx" | |
# uses: docker/setup-buildx-action@v1 | |
# - name: "🔧 cache docker layers" | |
# uses: actions/cache@v2 | |
# with: | |
# path: /tmp/.buildx-cache | |
# key: ${{ runner.os }}-buildx-${{ github.sha }} | |
# restore-keys: | | |
# ${{ runner.os }}-buildx- | |
# - name: "🔧 docker meta" | |
# id: meta | |
# uses: docker/metadata-action@v3 | |
# with: | |
# images: ${{ github.repository }} | |
# tags: latest | |
# - name: "📦 docker build" | |
# uses: docker/build-push-action@v2 | |
# with: | |
# context: . | |
# tags: ${{ steps.meta.outputs.tags }} | |
# labels: ${{ steps.meta.outputs.labels }} | |
# outputs: type=docker,dest=/tmp/docker.tar | |
# push: false | |
# cache-from: type=gha, scope=${{ github.workflow }} | |
# cache-to: type=gha, scope=${{ github.workflow }} | |
# - name: "📂 docker artifacts" | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: docker | |
# path: /tmp/docker.tar | |
# deploy-docs: | |
# needs: publish | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Check out | |
# uses: actions/checkout@v3 | |
# - name: Set up the environment | |
# uses: ./.github/actions/setup-poetry-env | |
# - name: Deploy documentation | |
# run: poetry run mkdocs gh-deploy --force |