💚 Update GitHub Actions workflow to include YAML files in tests direc… #68
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: Test and Release | |
permissions: | |
id-token: "write" | |
contents: "write" | |
packages: "write" | |
pull-requests: "read" | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
release: | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 |