Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #65
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: Testing and release | |
on: | |
push: | |
branches: | |
- main | |
- development | |
tags: | |
# The regex: /^v?((\d+)(\.\d+)*)(-?(a|b|c|rc|alpha|beta)([0-9]+)?)?$ | |
- 'v[0-9].[0-9]+.[0-9]+*' | |
pull_request: | |
branches: | |
- main | |
- development | |
jobs: | |
build_test: | |
name: Setup, build, and test | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
blender: [2.83, 2.93, 3.3, 3.6] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Get target py version | |
id: python | |
run: | | |
pwd | |
pythonver=$(python ./.github/scripts/blender_pyversion_lookup.py ${{ matrix.blender }}) | |
echo ::set-output name=version::$pythonver | |
- name: Configure python version | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ steps.python.outputs.version }} | |
- name: Setup python libs | |
id: pyexe | |
run: | | |
python --version | |
python -m pip install pytest | |
py_exe_path=$(which python) | |
echo ::set-output name=path::$py_exe_path | |
- name: Build and test | |
run: | | |
mkdir -p build && cd build; | |
cmake -DCMAKE_BUILD_TYPE=RELEASE -DGETEIGEN=ON -DGETPYBIND11=ON -DGAMER_TESTS=on -DBUILD_BLENDGAMER=ON -DBLENDER_VERSION_OVERRIDE=${{ matrix.blender }} -DBUILD_PYGAMER=on -DPython_EXECUTABLE:FILEPATH=${{ steps.pyexe.outputs.path }} -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 .. | |
cmake --build . --config Release -j 4 | |
ctest -C Release -V -j 4 | |
- name: Get blendgamer filename | |
id: pkg | |
run: | | |
pwd | |
cd build | |
zipfile=$(ls *.zip) | |
echo ::set-output name=filename::$zipfile | |
- name: Stash blendgamer | |
# Generate artifacts for all tagged versions | |
# if: startsWith(github.ref, 'refs/tags/') | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ steps.pkg.outputs.filename }} | |
path: build/*.zip | |
stage_releases: | |
name: Stage GitHub Release | |
runs-on: ubuntu-latest | |
needs: [build_test] | |
# Stage release for tagged versions | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Sync artifacts | |
uses: actions/[email protected] | |
with: | |
path: artifacts | |
- name: Display structure of files | |
run: ls -R | |
- name: Collect zipfiles | |
run: | | |
mv artifacts/blendgamer*.zip/blendgamer*.zip . | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: Generate SHA256 checksums | |
run: sha256sum *.zip > SHA256SUMS.txt | |
- name: Verify checksums | |
run: sha256sum -c SHA256SUMS.txt | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ github.ref }} | |
body: If you can read this, we have forgotten to fill in the changelog. Sorry! | |
draft: true | |
files: | | |
./*.zip | |
./SHA256SUMS.txt | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
deploy_to_pypi: | |
name: Deploy to PyPI | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
needs: [build_test] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Update python libs | |
run: python -m pip install scikit-build pytest | |
- name: Configures source dist | |
run: python setup.py sdist | |
- name: Display structure of files | |
run: ls -R | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
# - name: Publish package to TestPyPI | |
# uses: pypa/gh-action-pypi-publish@release/v1 | |
# with: | |
# user: __token__ | |
# password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
# repository_url: https://test.pypi.org/legacy/ |