Skip to content

turn back for relase #6

turn back for relase

turn back for relase #6

Workflow file for this run

name: Release
on:
push:
tags:
- v*
# on: [push]
jobs:
PyPIBuild:
if: ${{ github.repository == 'brickstudymasons/brickstudy' }}
name: Tagged Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
# Unfortunately, wheel will try to do setup.py install to
# build a wheel... and we need this stuff to be able to build
# for CPython.
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.11
- run: python3.11 -m venv .venv
- run: .venv/bin/python -m pip install wheel twine
- run: .venv/bin/python setup.py bdist_wheel
- run: .venv/bin/python setup.py bdist_egg
- run: >-
TWINE_USERNAME=__token__
TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }}
.venv/bin/python -m twine upload --skip-existing ./dist/*.whl
- uses: actions/upload-artifact@v2
with:
name: pypi-build
path: dist/*
CondaBuild:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
python-version: [3.11]
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- { os: windows-latest, shell: msys2 }
- { os: ubuntu-latest, shell: bash }
- { os: macos-latest, shell: bash }
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
auto-activate-base: false
activate-environment: ci
channels: conda-forge
- run: conda config --remove channels defaults
- name: Generate conda meta.yaml (Python 3.11)
run: python -u setup.py anaconda_gen_meta
- run: python -u setup.py bdist_conda
- name: Upload Anaconda package
run: >-
python setup.py anaconda_upload
--token=${{ secrets.ANACONDA_TOKEN }}
--package=./dist/*/*.tar.bz2
- uses: actions/upload-artifact@v2
with:
name: conda-build-${{ matrix.os }}-${{ matrix.python-version }}
path: dist/*/*.tar.bz2
PublishArtifacts:
runs-on: ubuntu-latest
needs: [PyPIBuild, CondaBuild]
steps:
- uses: actions/download-artifact@v2
with:
path: dist
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUBTOKEN }}"
prerelease: false
files: |
./dist/*/linux-64/brickstudy-*.tar.bz2
./dist/*/osx-64/brickstudy-*.tar.bz2
./dist/*/win-64/brickstudy-*.tar.bz2
./dist/pypi-build/*.whl
./dist/pypi-build/*.egg