new release #12
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
name: Upload Release Asset | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build | |
run: | | |
pip install Cython | |
python setup.py sdist | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Get Name of Artifact | |
run: | | |
ARTIFACT_PATHNAME=$(ls dist/fpylll-*.tar.gz | head -n 1) | |
ARTIFACT_NAME=$(basename $ARTIFACT_PATHNAME) | |
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV | |
echo "ARTIFACT_PATHNAME=${ARTIFACT_PATHNAME}" >> $GITHUB_ENV | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ env.ARTIFACT_PATHNAME }} | |
asset_name: ${{ env.ARTIFACT_NAME }} | |
asset_content_type: application/gzip |