Update compile.yml #2
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: Compile and Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install Nuitka | |
run: | | |
python -m pip install --upgrade pip | |
pip install nuitka | |
- name: Compile Python Script | |
run: | | |
$HOME/.local/bin/nuitka --standalone uwt.py | |
- name: Calculate SHA256 Checksum | |
run: | | |
sha256sum uwt.dist/uwt > uwt.dist/uwt.sha256 | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: v${{ github.run_number }} | |
release_name: Release ${{ github.run_number }} | |
body: | | |
**Changes in this Release:** | |
$(git log --format:"- %s%n" ${{ github.event.before }}..${{ github.sha }}) | |
**Compiled Executable Signatures:** | |
- GPG Signature: | |
```bash | |
gpg --verify uwt.dist/uwt | |
``` | |
- SHA256 Checksum: | |
```bash | |
cat uwt.dist/uwt.sha256 | |
``` | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: uwt.dist/uwt | |
asset_name: uwt | |
asset_content_type: application/octet-stream | |
- name: Upload SHA256 Checksum | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: uwt.dist/uwt.sha256 | |
asset_name: uwt.sha256 | |
asset_content_type: application/octet-stream |