-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (43 loc) · 1.17 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Build
permissions:
contents: write
on:
release:
types: [published]
jobs:
build:
name: Build executable 🔨
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: |
git fetch --prune --unshallow --tags
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
- run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: "3.12"
cache: 'poetry'
- run: poetry install
- if: matrix.os == 'ubuntu-latest'
run: |
shopt -s expand_aliases
. ./envr.ps1
build
- if: matrix.os == 'windows-latest'
run: |
. ./envr.ps1
build
- name: Get name of the portable build
id: get_name
shell: bash
run: echo "BUILD_NAME=$(ls dist | grep smpmgr-.*\.zip)" >> $GITHUB_OUTPUT
- name: Upload portable build 🚀
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/${{ steps.get_name.outputs.BUILD_NAME }}
tag: ${{ github.ref }}