Commit 33dcb825 by Sébastien Eustace

Fix release workflow

parent 85a672c4
...@@ -12,25 +12,33 @@ jobs: ...@@ -12,25 +12,33 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Get tag
id: tag
run: |
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: Building release - name: Building release
run: | run: |
make linux_release make linux_release
- name: Upload release file - name: Upload release file
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: poetry-${{ github.ref }}-linux.tar.gz name: poetry-${{ steps.tag.outputs.tag }}-linux.tar.gz
path: releases/poetry-${{ github.ref }}-linux.tar.gz path: releases/poetry-${{ steps.tag.outputs.tag }}-linux.tar.gz
- name: Upload checksum file - name: Upload checksum file
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: poetry-${{ github.ref }}-linux.sha256sum name: poetry-${{ steps.tag.outputs.tag }}-linux.sha256sum
path: releases/poetry-${{ github.ref }}-linux.sha256sum path: releases/poetry-${{ steps.tag.outputs.tag }}-linux.sha256sum
MacOS: MacOS:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Get tag
id: tag
run: |
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: Set up Python 3.8 - name: Set up Python 3.8
uses: actions/setup-python@v1 uses: actions/setup-python@v1
with: with:
...@@ -59,23 +67,29 @@ jobs: ...@@ -59,23 +67,29 @@ jobs:
tar -zxf python-3.8.0.tar.xz tar -zxf python-3.8.0.tar.xz
- name: Build specific release - name: Build specific release
run: | run: |
source $HOME/.poetry/env
poetry run python sonnet make release --ansi -P "2.7:python-2.7.17/bin/python" -P "3.4:python-3.4.10/bin/python" -P "3.5:python-3.5.9/bin/python" -P "3.6:python-3.6.8/bin/python" -P "3.7:python-3.7.5/bin/python" -P "3.8:python-3.8.0/bin/python" poetry run python sonnet make release --ansi -P "2.7:python-2.7.17/bin/python" -P "3.4:python-3.4.10/bin/python" -P "3.5:python-3.5.9/bin/python" -P "3.6:python-3.6.8/bin/python" -P "3.7:python-3.7.5/bin/python" -P "3.8:python-3.8.0/bin/python"
- name: Upload release file - name: Upload release file
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: poetry-${{ github.ref }}-darwin.tar.gz name: poetry-${{ steps.tag.outputs.tag }}-darwin.tar.gz
path: releases/poetry-${{ github.ref }}-darwin.tar.gz path: releases/poetry-${{ steps.tag.outputs.tag }}-darwin.tar.gz
- name: Upload checksum file - name: Upload checksum file
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: poetry-${{ github.ref }}-darwin.sha256sum name: poetry-${{ steps.tag.outputs.tag }}-darwin.sha256sum
path: releases/poetry-${{ github.ref }}-darwin.sha256sum path: releases/poetry-${{ steps.tag.outputs.tag }}-darwin.sha256sum
Windows: Windows:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Get tag
id: tag
shell: bash
run: |
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: Set up Python 3.8 - name: Set up Python 3.8
uses: actions/setup-python@v1 uses: actions/setup-python@v1
with: with:
...@@ -110,17 +124,18 @@ jobs: ...@@ -110,17 +124,18 @@ jobs:
7z x python-3.8.0.tar 7z x python-3.8.0.tar
- name: Build specific release - name: Build specific release
run: | run: |
$env:Path += ";$env:Userprofile\.poetry\bin"
poetry run python sonnet make release --ansi -P "2.7:python-2.7.17\python.exe" -P "3.4:python-3.4.4\python.exe" -P "3.5:python-3.5.4\python.exe" -P "3.6:python-3.6.8\python.exe" -P "3.7:python-3.7.5\python.exe" -P "3.8:python-3.8.0\python.exe" poetry run python sonnet make release --ansi -P "2.7:python-2.7.17\python.exe" -P "3.4:python-3.4.4\python.exe" -P "3.5:python-3.5.4\python.exe" -P "3.6:python-3.6.8\python.exe" -P "3.7:python-3.7.5\python.exe" -P "3.8:python-3.8.0\python.exe"
- name: Upload release file - name: Upload release file
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: poetry-${{ github.ref }}-win32.tar.gz name: poetry-${{ steps.tag.outputs.tag }}-win32.tar.gz
path: releases/poetry-${{ github.ref }}-win32.tar.gz path: releases/poetry-${{ steps.tag.outputs.tag }}-win32.tar.gz
- name: Upload checksum file - name: Upload checksum file
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: poetry-${{ github.ref }}-win32.sha256sum name: poetry-${{ steps.tag.outputs.tag }}-win32.sha256sum
path: releases/poetry-${{ github.ref }}-win32.sha256sum path: releases/poetry-${{ steps.tag.outputs.tag }}-win32.sha256sum
Release: Release:
needs: [Linux, MacOS, Windows] needs: [Linux, MacOS, Windows]
...@@ -132,35 +147,35 @@ jobs: ...@@ -132,35 +147,35 @@ jobs:
- name: Download Linux release file - name: Download Linux release file
uses: actions/download-artifact@master uses: actions/download-artifact@master
with: with:
name: poetry-${{ github.ref }}-linux.tar.gz name: poetry-${{ steps.tag.outputs.tag }}-linux.tar.gz
- name: Download Linux checksum file - name: Download Linux checksum file
uses: actions/download-artifact@master uses: actions/download-artifact@master
with: with:
name: poetry-${{ github.ref }}-linux.sha256sum name: poetry-${{ steps.tag.outputs.tag }}-linux.sha256sum
- name: Download MacOS release file - name: Download MacOS release file
uses: actions/download-artifact@master uses: actions/download-artifact@master
with: with:
name: poetry-${{ github.ref }}-darwin.tar.gz name: poetry-${{ steps.tag.outputs.tag }}-darwin.tar.gz
- name: Download MacOS checksum file - name: Download MacOS checksum file
uses: actions/download-artifact@master uses: actions/download-artifact@master
with: with:
name: poetry-${{ github.ref }}-darwin.sha256sum name: poetry-${{ steps.tag.outputs.tag }}-darwin.sha256sum
- name: Download Windows release file - name: Download Windows release file
uses: actions/download-artifact@master uses: actions/download-artifact@master
with: with:
name: poetry-${{ github.ref }}-win32.tar.gz name: poetry-${{ steps.tag.outputs.tag }}-win32.tar.gz
- name: Download Windows checksum file - name: Download Windows checksum file
uses: actions/download-artifact@master uses: actions/download-artifact@master
with: with:
name: poetry-${{ github.ref }}-win32.sha256sum name: poetry-${{ steps.tag.outputs.tag }}-win32.sha256sum
- name: Create Release - name: Create Release
id: create_release id: create_release
uses: actions/create-release@v1 uses: actions/create-release@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
tag_name: ${{ github.ref }} tag_name: ${{ steps.tag.outputs.tag }}
release_name: ${{ github.ref }} release_name: ${{ steps.tag.outputs.tag }}
draft: false draft: false
prerelease: false prerelease: false
- name: Upload Linux release file asset - name: Upload Linux release file asset
...@@ -169,7 +184,7 @@ jobs: ...@@ -169,7 +184,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ steps.create_release.outputs.upload_url }} upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: poetry-${{ github.ref }}-linux.tar.gz asset_name: poetry-${{ steps.tag.outputs.tag }}-linux.tar.gz
asset_content_type: application/gzip asset_content_type: application/gzip
- name: Upload Linux checksum file asset - name: Upload Linux checksum file asset
uses: actions/upload-release-asset@v1.0.1 uses: actions/upload-release-asset@v1.0.1
...@@ -177,7 +192,7 @@ jobs: ...@@ -177,7 +192,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ steps.create_release.outputs.upload_url }} upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: poetry-${{ github.ref }}-linux.sha256sum asset_name: poetry-${{ steps.tag.outputs.tag }}-linux.sha256sum
asset_content_type: text/pain asset_content_type: text/pain
- name: Upload MacOS release file asset - name: Upload MacOS release file asset
uses: actions/upload-release-asset@v1.0.1 uses: actions/upload-release-asset@v1.0.1
...@@ -185,7 +200,7 @@ jobs: ...@@ -185,7 +200,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ steps.create_release.outputs.upload_url }} upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: poetry-${{ github.ref }}-darwin.tar.gz asset_name: poetry-${{ steps.tag.outputs.tag }}-darwin.tar.gz
asset_content_type: application/gzip asset_content_type: application/gzip
- name: Upload MacOS checksum file asset - name: Upload MacOS checksum file asset
uses: actions/upload-release-asset@v1.0.1 uses: actions/upload-release-asset@v1.0.1
...@@ -193,7 +208,7 @@ jobs: ...@@ -193,7 +208,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ steps.create_release.outputs.upload_url }} upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: poetry-${{ github.ref }}-darwin.sha256sum asset_name: poetry-${{ steps.tag.outputs.tag }}-darwin.sha256sum
asset_content_type: text/pain asset_content_type: text/pain
- name: Upload Windows release file asset - name: Upload Windows release file asset
uses: actions/upload-release-asset@v1.0.1 uses: actions/upload-release-asset@v1.0.1
...@@ -201,7 +216,7 @@ jobs: ...@@ -201,7 +216,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ steps.create_release.outputs.upload_url }} upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: poetry-${{ github.ref }}-win32.tar.gz asset_name: poetry-${{ steps.tag.outputs.tag }}-win32.tar.gz
asset_content_type: application/gzip asset_content_type: application/gzip
- name: Upload Windows checksum file asset - name: Upload Windows checksum file asset
uses: actions/upload-release-asset@v1.0.1 uses: actions/upload-release-asset@v1.0.1
...@@ -209,7 +224,7 @@ jobs: ...@@ -209,7 +224,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
upload_url: ${{ steps.create_release.outputs.upload_url }} upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_name: poetry-${{ github.ref }}-win32.sha256sum asset_name: poetry-${{ steps.tag.outputs.tag }}-win32.sha256sum
asset_content_type: text/pain asset_content_type: text/pain
- name: Install Poetry - name: Install Poetry
run: | run: |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment