-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f73b090
commit af0a5fc
Showing
3 changed files
with
73 additions
and
63 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Build | ||
|
||
on: [push, pull_request] | ||
|
@@ -9,15 +7,58 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Unshallow | ||
run: git fetch --prune --unshallow --tags --force | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
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 PYTHON=python | ||
- name: Dist | ||
run: make dist PYTHON=python | ||
- name: Upload artifacts | ||
if: github.ref_type == 'tag' | ||
uses: actions/[email protected] | ||
with: | ||
name: dist | ||
path: Qahiri-*.zip | ||
if-no-files-found: error | ||
|
||
deploy: | ||
if: github.ref_type == 'tag' | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download artifacts | ||
uses: actions/[email protected] | ||
with: | ||
path: dist | ||
|
||
- name: Extract release notes from annotated tag message | ||
run: | | ||
make | ||
# 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/*/* |
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
This file was deleted.
Oops, something went wrong.