Skip to content

Merge pull request #21 from pyiron/py311 #24

Merge pull request #21 from pyiron/py311

Merge pull request #21 from pyiron/py311 #24

Workflow file for this run

name: Deploy
on:
push:
branches: [ main ]
jobs:
createrelease:
name: createrelease
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v1
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +%F)"
- name: create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.date.outputs.date }}
release_name: Release ${{ steps.date.outputs.date }}
draft: false
prerelease: false
- name: Output Release URL File
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
- name: Date File
run: echo "${{ steps.date.outputs.date }}" > date.txt
- name: Save Release URL File for publish
uses: actions/upload-artifact@v1
with:
name: release_url
path: release_url.txt
- name: Save Date File for publish
uses: actions/upload-artifact@v1
with:
name: date
path: date.txt
build_linux:
name: Linux
needs: [createrelease]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: "3.11"
- name: Load Release URL File from release job
uses: actions/download-artifact@v1
with:
name: release_url
- name: Load Date File from release job
uses: actions/download-artifact@v1
with:
name: date
- name: Get Release File Name & Upload URL
id: get_release_info
run: |
value=`cat release_url/release_url.txt`
echo ::set-output name=upload_url::$value
- name: Get Release File Name & Upload URL
id: get_date_info
run: |
value=`cat date/date.txt`
echo ::set-output name=date::$value
- name: Build Constructor
shell: bash -l {0}
run: |
conda install -y --name test -c conda-forge constructor
mkdir build
constructor -v --output-dir=build --platform="linux-64" constructor
mv ./build/pyiron-0.0.0-Linux-x86_64.sh ./build/$FILENAME
env:
FILENAME: pyiron-${{ steps.get_date_info.outputs.date }}-Linux-x86_64.sh
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: ./build/pyiron-${{ steps.get_date_info.outputs.date }}-Linux-x86_64.sh
asset_name: pyiron-${{ steps.get_date_info.outputs.date }}-Linux-x86_64.sh
asset_content_type: application/zip
build_mac:
name: MacOsX
needs: [createrelease]
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: "3.11"
- name: Load Release URL File from release job
uses: actions/download-artifact@v1
with:
name: release_url
- name: Load Date File from release job
uses: actions/download-artifact@v1
with:
name: date
- name: Get Release File Name & Upload URL
id: get_release_info
run: |
value=`cat release_url/release_url.txt`
echo ::set-output name=upload_url::$value
- name: Get Release File Name & Upload URL
id: get_date_info
run: |
value=`cat date/date.txt`
echo ::set-output name=date::$value
- name: Build Constructor
shell: bash -l {0}
run: |
conda install -y --name test -c conda-forge constructor
mkdir build
constructor -v --output-dir=build --platform="osx-64" constructor
mv ./build/pyiron-0.0.0-MacOSX-x86_64.pkg ./build/$FILENAME
env:
FILENAME: pyiron-${{ steps.get_date_info.outputs.date }}-MacOSX-x86_64.pkg
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: ./build/pyiron-${{ steps.get_date_info.outputs.date }}-MacOSX-x86_64.pkg
asset_name: pyiron-${{ steps.get_date_info.outputs.date }}-MacOSX-x86_64.pkg
asset_content_type: application/zip
build_win:
name: Windows
needs: [createrelease]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: "3.11"
- name: Load Release URL File from release job
uses: actions/download-artifact@v1
with:
name: release_url
- name: Load Date File from release job
uses: actions/download-artifact@v1
with:
name: date
- name: Get Release File Name & Upload URL
id: get_release_info
run: |
$value = Get-Content release_url/release_url.txt
echo "::set-output name=upload_url::$value"
- name: Get Release File Name & Upload URL
id: get_date_info
run: |
$value = Get-Content date/date.txt
echo "::set-output name=date::$value"
- name: Build Constructor
shell: bash -l {0}
run: |
conda install -y --name test -c conda-forge constructor
mkdir build
constructor -v --output-dir=build --platform="win-64" constructor
mv ./build/pyiron-0.0.0-Windows-x86_64.exe ./build/$FILENAME
env:
FILENAME: pyiron-${{ steps.get_date_info.outputs.date }}-Windows-x86_64.exe
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: ./build/pyiron-${{ steps.get_date_info.outputs.date }}-Windows-x86_64.exe
asset_name: pyiron-${{ steps.get_date_info.outputs.date }}-Windows-x86_64.exe
asset_content_type: application/zip