Skip to content

🚧 Update file paths in release workflow #24

🚧 Update file paths in release workflow

🚧 Update file paths in release workflow #24

Workflow file for this run

name: Test and Release
permissions:
id-token: "write"
contents: "write"
packages: "write"
pull-requests: "read"
on:
push:
branches:
- '**'
tags:
- '*'
jobs:
test:
runs-on: ubuntu-latest
services:
docker:
image: docker:19.03.12
options: --privileged
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Upgrade pip and Install build tools
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Install Python dependencies with binary preference
run: |
pip install pytest pytest-workflow miniwdl
- name: Run tests with Docker
run: |
pytest tasks/
release:
needs: [test]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create tar.gz of directories
run: |
# Change to the parent directory
cd ..
# Extract the tag name from GITHUB_REF (assuming it's a tag push)
TAG_NAME=$(echo $GITHUB_REF | sed 's#refs/tags/##')
# Create a file with the tag name
echo "Version: $TAG_NAME" > wdl-hub/version.txt
# Find .wdl files and include the version file in the tar.gz archive
find wdl-hub -type f -name "*.wdl" -print > filelist.txt
echo wdl-hub/version.txt >> filelist.txt
tar -czvf release.tar.gz --files-from=filelist.txt
# Change back to the original directory
cd -
- name: Create a Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
../release.tar.gz