Minor #459
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 | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
- name: Build | |
run: make -B | |
- name: Test | |
run: | | |
python -m pip install -r requirements-test.txt | |
make test | |
- name: Dist | |
run: make dist | |
- name: Upload artifacts | |
if: github.ref_type == 'tag' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: Raqq-*.zip | |
if-no-files-found: error | |
deploy: | |
if: github.ref_type == 'tag' | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
path: dist | |
- name: Extract release notes from annotated tag message | |
run: | | |
# GH checkout action doesn't preserve tag annotations, we must fetch them | |
# https://github.com/actions/checkout/issues/290 | |
git fetch --tags --force | |
echo "$(git tag -l --format='%(contents:body)' ${{ github.ref_name }})" > "${{ runner.temp }}/release_body.md" | |
echo "release_name=$(git tag -l --format='%(contents:subject)' ${{ github.ref_name }})" >> $GITHUB_ENV | |
- name: Publish | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ env.release_name }} | |
body_path: ${{ runner.temp }}/release_body.md | |
fail_on_unmatched_files: true | |
files: | | |
dist/*/* |