]> git.madduck.net Git - etc/vim.git/blob - .github/workflows/upload_binary.yml

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Add lower bound for aiohttp-cors + fix primer (#2231)
[etc/vim.git] / .github / workflows / upload_binary.yml
1 name: Upload self-contained binaries
2
3 on:
4   release:
5     types: [published]
6
7 jobs:
8   build:
9     runs-on: ${{ matrix.os }}
10     strategy:
11       fail-fast: false
12       matrix:
13         python-version: [3.7]
14         os: [ubuntu-16.04, windows-2019]
15         include:
16           - os: windows-2019
17             pathsep: ";"
18             executable_suffix: ".exe"
19             executable_mime: "application/vnd.microsoft.portable-executable"
20           - os: ubuntu-16.04
21             pathsep: ":"
22             executable_suffix: ".elf"
23             executable_mime: "application/x-executable"
24
25     steps:
26       - uses: actions/checkout@v2
27
28       - name: Set up Python ${{ matrix.python-version }}
29         uses: actions/setup-python@v2
30         with:
31           python-version: ${{ matrix.python-version }}
32
33       - name: Install dependencies
34         run: |
35           python -m pip install --upgrade pip wheel setuptools
36           python -m pip install .
37           python -m pip install pyinstaller
38
39       - name: Build binary
40         run: |
41           python -m PyInstaller -F --name black${{ matrix.executable_suffix }} --add-data 'src/blib2to3${{ matrix.pathsep }}blib2to3' src/black/__main__.py
42
43       - name: Upload binary as release asset
44         uses: actions/upload-release-asset@v1
45         env:
46           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47         with:
48           upload_url: ${{ github.event.release.upload_url }}
49           asset_path: dist/black${{ matrix.executable_suffix }}
50           asset_name: black${{ matrix.executable_suffix }}
51           asset_content_type: ${{ matrix.executable_mime }}