diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..03abd4e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,58 @@ +name: publish + +on: + release: + types: [created] + +jobs: + publish: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + # windows-latest, macos-latest + + defaults: + run: + working-directory: ./frontend + + steps: + - name: Check out Git repository + uses: actions/checkout@v2 + + - name: Configure Node caching + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install Node dependencies + run: npm install + + - name: Build distribution + env: + CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} + CSC_LINK: ${{ secrets.CSC_LINK }} + APPLEID: ${{ secrets.APPLEID }} + APPLEIDPASS: ${{ secrets.APPLEIDPASS }} + run: npm run dist + + - name: Create zip file + if: startsWith(matrix.os, 'ubuntu') + run: | + cd dist + ditto -c -k --keepParent DedupliFHIR*.AppImage DedupliFHIR.app.zip + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: DedupliFHIR-macOS + path: | + dist/DedupliFHIR.app.zip diff --git a/frontend/main.js b/frontend/main.js index fab3ffb..3e87559 100644 --- a/frontend/main.js +++ b/frontend/main.js @@ -15,7 +15,12 @@ var resultsFile; function findPython() { const possibilities = [ // In packaged app + path.join(process.resourcesPath, "python", "bin", "python"), + path.join(process.resourcesPath, "python", "bin", "python3"), + path.join(process.resourcesPath, "python", "bin", "python3.10"), path.join(process.resourcesPath, "python", "bin", "python3.11"), + path.join(process.resourcesPath, "python", "bin", "python3.12"), + // In development path.join("..", ".venv", "bin", "python"), ];