Merge pull request #27 from gtinside/dev #14
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: Create Release | |
on: | |
push: | |
tags: | |
- '**' | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run tests | |
run: | | |
python -m pytest | |
- name: Create tarball | |
run: | | |
TAG_NAME=${{ github.ref_name }} | |
TAR_NAME="${TAG_NAME}.tar.gz" | |
echo "Creating tarball: $TAR_NAME" | |
# Use a temporary directory for tarball creation | |
TMP_DIR=$(mktemp -d) | |
cp -r * "$TMP_DIR/" | |
# Create tarball from the temporary directory | |
tar -czf "$TAR_NAME" -C "$TMP_DIR" . | |
# Clean up temporary directory | |
rm -rf "$TMP_DIR" | |
- uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ github.ref_name }} | |
generateReleaseNotes: true |