Skip to content

Commit

Permalink
add a GitHub release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
malb committed May 26, 2022
1 parent b7fad58 commit 9133be9
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
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/g6k-*.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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def read_from(filename, field, sep):
]

setup(
name="G6K",
name="g6k",
description="General Sieve Kernel",
version=__version__,
url="https://github.com/fplll/g6k",
Expand Down

0 comments on commit 9133be9

Please sign in to comment.