-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 1.2 KB
/
release.yml
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
name: Release
on:
release:
types: ["published"]
jobs:
release:
runs-on: ${{ matrix.platform == 'linux' && 'ubuntu-latest' || matrix.platform == 'windows' && 'ubuntu-latest' || matrix.platform == 'osx' && 'macos-latest' }}
strategy:
matrix:
platform: [linux, windows, osx]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build binary
if: matrix.platform == 'linux' || matrix.platform == 'windows'
run: docker run --rm -v "${PWD}:/src/" --env SPECFILE=./schwifty.spec batonogov/pyinstaller-${{ matrix.platform }}
- name: Build binary (macos)
uses: devcontainers/[email protected]
if: matrix.platform == 'osx'
with:
runCmd: devenv test
- name: Test binary
run: dist/schwifty "DE89370400440532013000"
- name: Compress binary
run: tar -czvf schwifty-${{ matrix.platform }}.tar.gz -C dist/ schwifty
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./schwifty-${{ matrix.platform }}.tar.gz
asset_name: schwifty-${{ matrix.platform }}.tar.gz
asset_content_type: application/gzip