Skip to content

Commit

Permalink
Create publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
azat-ismagilov authored Jul 25, 2024
1 parent ff872cf commit 043b22b
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Publish via ftp

on: workflow_dispatch

jobs:
build:
name: Create artifacts from master
runs-on: ubuntu-latest

strategy:
matrix:
include:
- public_url: gallery # wf
data_folder: data
- public_url: galleryNAC # nac
data_folder: dataNAC
- public_url: galleryNERC # nerc
data_folder: dataNERC
- public_url: galleryLAC # lac
data_folder: dataLAC
- public_url: galleryAE # ae
data_folder: dataAE
- public_url: galleryAW # aw
data_folder: dataAW
- public_url: galleryAP # ap
data_folder: dataAP
- public_url: galleryEU # eu
data_folder: dataEU
- public_url: galleryACPC # acpc
data_folder: dataACPC

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'npm'
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Build
run: PUBLIC_URL=${{ matrix.public_url }} VITE_DATA_FOLDER=${{ matrix.data_folder }} ./build.sh
- name: Upload
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.public_url }}
path: ${{ matrix.public_url }}.zip
publish:
name: Publish the release and merge the zips
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: .
- name: Unzip all zip from multiple zips
run: |
mkdir build-all
cp build-*/*.zip build-all
cd build-all
ls
unzip '*.zip'
rm *.zip
ls
- name: Upload to ftp
uses: SamKirkland/[email protected]
with:
server: ftp.u.icpc.global
port: 21
protocol: ftps
username: [email protected]
password: ${{ secrets.ftp_password }}
local-dir: build-all/
dry-run: true
- name: Upload raw
uses: actions/upload-artifact@v4
with:
name: all
path: build-all

0 comments on commit 043b22b

Please sign in to comment.