Skip to content

Release

Release #82

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]*'
jobs:
test:
strategy:
matrix:
platform: [ubuntu-20.04, macos-13, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
- name: Setup poetry
run: python3 -m pip install poetry
- name: Install dependencies
run: python3 -m poetry install
- name: Run tests
run: make test
- name: Build package
id: build_package
run: make package
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: package-${{ matrix.platform }}
path: dist/${{ steps.build_package.outputs.package_filename }}
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: test
runs-on: ubuntu-latest
steps:
- name: Download
uses: actions/download-artifact@v4
with:
path: packages
pattern: package-*
merge-multiple: true
- name: Get environment
id: environment
run: |
echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
echo "tag_name=$(echo ${{ github.ref }} | cut -d / -f 3)" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5
with:
tag: ${{ steps.environment.outputs.tag_name }}
name: "Release: [${{ steps.environment.outputs.tag_name }}] - ${{ steps.environment.outputs.date }}"
artifacts: "packages/*.zip"
artifactContentType: "application/zip"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true