Skip to content

Tag name fixed

Tag name fixed #2

name: Assignment Release Workflow
on:
push:
branches:
- main
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: latest
auto-update-conda: false
auto-activate-base: false
- name: Configure Conda
run: |
conda config --set auto_activate_base false
- name: Create and Activate Conda Environment
run: |
. $CONDA/etc/profile.d/conda.sh
conda env create -f ./environment.yml || exit 1
conda activate pact_env || exit 1
pip install .
working-directory: ${{ github.workspace }}
- name: Run conversion script
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate pact_env
echo "Using Python at $(which python)"
python pact/convert_all.py
- name: Filter and List Files
run: |
mkdir -p filtered_files
for d in ./assignments/*/STUDENT_VERSION/; do
assignment=`basename $(dirname $d)`
if [[ -f "${d}/${assignment}.zip" ]]; then
cp "${d}/${assignment}.zip" "filtered_files/"
fi
done
shell: bash
- name: Create and Upload GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: release-${{ github.run_number }}
release_name: Assignment Conversion - ${{ github.run_number }}
body: "The following zip files are the converted versions of the assignments."
draft: false
prerelease: false
files: ./filtered_files/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}