Skip to content

try without relative directory #27

try without relative directory

try without relative directory #27

Workflow file for this run

name: Release
on:
push:
tags:
- v*.*.*
jobs:
tests:
strategy:
matrix:
python-version: [3.11]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.workflow_run.head_branch }}
token: ${{secrets.edifact_templates_pat}} # expires 2023-04-24
submodules: "recursive"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: Run tox
run: |
tox -e unit_tests
tox -e integration_tests
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
strategy:
matrix:
python-version: [3.11]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
needs: tests
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Build a binary wheel and a source tarball
run: |
tox -e test_packaging
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
release:
needs: build-n-publish
strategy:
matrix:
python-version: ["3.11"]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
architecture: x64
python-version: ${{ matrix.python-version }}
- uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.DEVELOPER_CERT_BASE64 }}
p12-password: ${{ secrets.DEVELOPER_CERT_PW }}
if: matrix.os == 'macos-latest'
- name: Set up gon
run: |
brew tap mitchellh/gon
brew install mitchellh/gon/gon
if: matrix.os == 'macos-latest'
- name: Build Executable
run: |
pip install tox
tox -e build_executable -- --name maus_cli_${{ runner.os == 'Windows' && 'win' || runner.os == 'macOS' && 'macos' || 'linux' }} --codesign-identity BC9D64D82416AF9EB2A9487FDBFAB05ED6B39CA3 --windowed
- name: Package app
run: |
ditto -c -k --keepParent "dist/maus_cli_macos.app" dist/maus_cli_macos.zip
if: matrix.os == 'macos-latest'
- name: Notarize app
run: |
gon gon.json
env:
AC_PASSWORD: ${{ secrets.NOTARIZE_PASSWORD }}
if: matrix.os == 'macos-latest'
- name: Staple app
run: |
xcrun stapler staple dist/maus_cli_macos.app
xcrun stapler validate dist/maus_cli_macos.app
if: matrix.os == 'macos-latest'
- name: Generate release notes
id: create_release_notes
uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml
version: ${{ github.ref }}
publish: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release and Upload Executable
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.create_release_notes.outputs.body }}
files: |
dist/maus_cli_${{ runner.os == 'Windows' && 'win' || runner.os == 'macOS' && 'macos.app' || 'linux' }}${{ runner.os == 'Windows' && '.exe' || '' }}