Fix trailing newline #762
Workflow file for this run
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
on: | |
push: | |
tags: | |
- v* | |
pull_request: # Build windows exe and docs, but not release anything | |
jobs: | |
windows-build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
# This should be the oldest python version we support, so it is | |
# backwards-compatible for older windows versions. | |
python-version: "3.9" | |
cache: pip | |
- run: pip install wheel | |
- run: pip install -r requirements-dev.txt | |
- uses: egor-tensin/setup-clang@v1 | |
with: | |
platform: x64 | |
# -u makes print show in real time | |
- run: python -u scripts/build-exe-installer.py | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: windows-exe | |
path: build/PorcupineSetup_*.exe | |
changelog: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
# Extract second "## blah" separated part, excluding the "## blah" lines | |
# https://stackoverflow.com/a/20943815 | |
awk '/^## / { part++ } (part == 1 && line++ != 0) { print }' CHANGELOG.md | tee changelog_part.md | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: changelog | |
path: changelog_part.md | |
release: | |
runs-on: ubuntu-latest | |
# https://stackoverflow.com/a/58478262 | |
#needs: [windows-build, docs, changelog] | |
needs: [windows-build, changelog] | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: windows-exe | |
- uses: actions/download-artifact@v4 | |
with: | |
name: changelog | |
- id: get_version | |
uses: battila7/get-version-action@v2 | |
- id: create_release | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
body_path: changelog_part.md | |
- uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: PorcupineSetup_${{ steps.get_version.outputs.version-without-v }}.exe | |
asset_name: PorcupineSetup_${{ steps.get_version.outputs.version-without-v }}.exe | |
asset_content_type: application/vnd.microsoft.portable-executable |