fix: Fix PsiTurk release location #162
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: Pull Request | |
# Runs the build and test scripts on PR | |
on: pull_request | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-and-test: | |
name: 🧪 Build and Test | |
runs-on: ${{ matrix.os }} | |
# Run action for [home/clinic] with in [windows/macOS/ubuntu] | |
strategy: | |
matrix: | |
setting: [home, clinic] | |
os: [windows-latest, macOS-latest, ubuntu-latest] | |
fail-fast: false # A failed build will not end the other matrix jobs | |
steps: | |
# Set up runner | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v4 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- name: 🐍 Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
# # Install dependencies and set up environment | |
# - name: 📥 Install Dependencies | |
# run: npm ci | |
# - name: 🔃 Load .env file (.env.${{matrix.setting}}) | |
# uses: xom9ikk/dotenv@v2 | |
# with: | |
# path: ./env | |
# mode: ${{matrix.setting}} | |
# # Test and lint | |
# - name: 🧪 Test | |
# run: npm test | |
# env: | |
# CI: true | |
# - name: 🔬 Lint | |
# run: npm run lint -- --max-warnings=0 | |
# # Build the app | |
# - name: ⚒ Build | |
# run: npm run build | |
# TEMP - TEST ACTION ON PR | |
package-psiturk: | |
name: Package for PsiTurk | |
runs-on: ubuntu-latest | |
steps: | |
# Set up runner | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v4 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
cache: npm | |
- name: 🐍 Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
# Install dependencies | |
- name: 📥 Install Dependencies | |
run: npm ci | |
- name: 📥 Install PsiTurk | |
run: pip install psiturk | |
# Build the app | |
- name: ⚒ Build | |
run: npm run build | |
# Get package info | |
- name: Get package name and version | |
id: package_info | |
run: | | |
echo "name=$(cat package.json | jq -r '.name')" >> $GITHUB_OUTPUT | |
echo "version=$(cat package.json | jq -r '.version')" >> $GITHUB_OUTPUT | |
# shell: bash | |
# Package on PsiTurk | |
- name: 📦 Create Psiturk Build | |
run: | | |
cd psiturkit | |
./psiturk-it -p ${{ steps.package_info.outputs.name }}-${{ steps.package_info.outputs.version }}-psiturk | |
# - name: Zip PsiTurk folder | |
# uses: montudor/action-zip@v1 | |
# with: | |
# args: zip -qq -r ${{ steps.package_info.outputs.name }}-psiturk.zip . -i ${{ steps.package_info.outputs.name }}-psiturk | |
- run: ls | |
- run: ls psiturkit | |
- name: ⬆ Upload PsiTurk Build | |
uses: actions/upload-artifact@v3 | |
with: | |
# name: ${{ steps.package_info.outputs.name }}-${{ steps.package_info.outputs.version }}-psiturk.zip | |
path: psiturkit/${{ steps.package_info.outputs.name }}-${{ steps.package_info.outputs.version }}-psiturk | |
if-no-files-found: error | |
# uses: svenstaro/upload-release-action@v2 | |
# with: | |
# file: psiturkit/${{ steps.package_info.outputs.name }}-psiturk.zip | |
# asset_name: ${{ steps.package_info.outputs.name }}-${{ steps.package_info.outputs.version }}-psiturk | |
# tag: ${{ github.ref }} | |
# repo_token: ${{ secrets.GITHUB_TOKEN }} |