|
1 | | -name: Building Executable |
2 | | -run-name: ${{ github.actor }} is buildling TiPlot 🚀 |
| 1 | +name: Building Executables ⚡ |
| 2 | +run-name: ${{ github.actor }} is building TiPlot 🚀 |
3 | 3 | on: |
| 4 | + workflow_dispatch: |
4 | 5 | push: |
5 | 6 | branches: |
6 | 7 | - main |
| 8 | + paths: |
| 9 | + - "package.json" |
| 10 | + |
7 | 11 | jobs: |
8 | 12 | Build-AppImage: |
9 | 13 | runs-on: ubuntu-20.04 |
10 | 14 | steps: |
11 | | - - uses: actions/checkout@v3 |
12 | | - - uses: actions/setup-python@v4 |
| 15 | + - name: Checkout code 📥 |
| 16 | + uses: actions/checkout@v3 |
| 17 | + - name: Setup Python 🐍 |
| 18 | + uses: actions/setup-python@v4 |
13 | 19 | with: |
14 | 20 | python-version: "3.10" |
15 | | - - run: tree |
16 | | - - uses: syphar/restore-virtualenv@v1 |
| 21 | + - name: List files 📄 |
| 22 | + run: tree 🌳 |
| 23 | + - name: Set variables 📝 |
| 24 | + run: | |
| 25 | + VER=$(grep -E -o '"version": ".*"' package.json | sed -e 's/"version": "//g' | tr -d '"') |
| 26 | + echo "VERSION=$VER" >> $GITHUB_ENV |
| 27 | + - name: Create Release 🏗️ |
| 28 | + id: create_release |
| 29 | + uses: actions/create-release@v1 |
| 30 | + env: |
| 31 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 32 | + with: |
| 33 | + tag_name: v${{ env.VERSION }} |
| 34 | + release_name: Tiplot v${{ env.VERSION }} |
| 35 | + body: ${{ github.event.head_commit.message }} |
| 36 | + draft: true |
| 37 | + prerelease: false |
| 38 | + - name: Restore virtualenv cache 📦 |
| 39 | + uses: syphar/restore-virtualenv@v1 |
17 | 40 | id: cache-virtualenv |
18 | 41 | with: |
19 | 42 | requirement_files: api/requirements.txt |
20 | | - - uses: syphar/restore-pip-download-cache@v1 |
| 43 | + - name: Restore pip download cache 📦 |
| 44 | + uses: syphar/restore-pip-download-cache@v1 |
21 | 45 | if: steps.cache-virtualenv.outputs.cache-hit != 'true' |
22 | | - # the package installation will only be executed when the |
23 | | - # requirements-files have changed. |
24 | | - - run: pip install -r api/requirements.txt |
| 46 | + - name: Install Python dependencies 🐍 |
| 47 | + run: pip install -r api/requirements.txt |
25 | 48 | if: steps.cache-virtualenv.outputs.cache-hit != 'true' |
26 | | - - name: install node dependecies |
| 49 | + - name: Install Node dependencies 📦 |
27 | 50 | run: yarn install |
28 | | - - name: build backend |
| 51 | + - name: Build backend 🔨 |
29 | 52 | run: yarn build:api |
30 | | - - name: build desktop app |
| 53 | + - name: Build desktop app 💻 |
| 54 | + run: yarn build:electron |
31 | 55 | env: |
32 | 56 | GH_TOKEN: ${{ github.token }} |
33 | 57 | # CI: false # ignore warnings |
34 | | - run: yarn build:electron |
35 | 58 |
|
36 | 59 | Build-EXE: |
37 | 60 | runs-on: windows-latest |
38 | 61 | steps: |
39 | | - - uses: actions/checkout@v3 |
40 | | - - uses: actions/setup-python@v4 |
| 62 | + - name: Checkout code 📥 |
| 63 | + uses: actions/checkout@v3 |
| 64 | + - name: Setup Python 🐍 |
| 65 | + uses: actions/setup-python@v4 |
41 | 66 | with: |
42 | 67 | python-version: "3.10" |
43 | | - - run: tree |
44 | | - - name: install node dependecies |
| 68 | + - name: List files 📄 |
| 69 | + run: tree 🌳 |
| 70 | + - name: Install Node dependencies 📦 |
45 | 71 | run: yarn install |
46 | | - - run: pip install -r api/requirements.txt |
47 | | - - name: build backend |
| 72 | + - name: Install Python dependencies 🐍 |
| 73 | + run: pip install -r api/requirements.txt |
| 74 | + - name: Build backend 🔨 |
48 | 75 | run: yarn build:api |
49 | | - - name: build desktop app |
| 76 | + - name: Build desktop app 💻 |
| 77 | + run: yarn build:electron |
50 | 78 | env: |
51 | 79 | GH_TOKEN: ${{ github.token }} |
52 | 80 | # CI: false # ignore warnings |
53 | | - run: yarn build:electron |
|
0 commit comments