Use Last-Modified and ETag headers to determine KIT-IPD file versions… #327
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-and-release | |
on: [push, pull_request] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-13, macos-latest] | |
python: ["3.9"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Set up project | |
if: matrix.os != 'windows-latest' | |
run: ./scripts/setup | |
- name: Set up project on windows | |
if: matrix.os == 'windows-latest' | |
# For some reason, `pip install --upgrade pip` doesn't work on | |
# 'windows-latest'. The installed pip version works fine however. | |
run: ./scripts/setup --no-pip | |
- name: Run checks | |
run: | | |
./scripts/check | |
./scripts/format | |
- name: Assert no changes | |
run: git diff --exit-code | |
- name: Build | |
run: ./scripts/build | |
- name: Rename binary | |
# Glob in source location because on windows pyinstaller creates a file | |
# named "pferd.exe" | |
run: mv dist/pferd* dist/pferd-${{ matrix.os }} | |
- name: Upload binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pferd-${{ matrix.os }} | |
path: dist/pferd-${{ matrix.os }} | |
release: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: build | |
steps: | |
- name: Download binaries | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: pferd-* | |
merge-multiple: true | |
- name: Rename binaries | |
run: | | |
mv pferd-ubuntu-latest pferd-linux | |
mv pferd-windows-latest pferd-windows.exe | |
mv pferd-macos-13 pferd-mac-x86_64 | |
mv pferd-macos-latest pferd-mac | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
pferd-linux | |
pferd-windows.exe | |
pferd-mac | |
pferd-mac-x86_64 |