Update main.yml #3
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 Debian Package and Publish Release | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build Package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install build dependencies | |
run: sudo apt-get update && sudo apt-get install -y debhelper | |
- name: Build Debian package | |
run: dpkg-deb --build vanosilla-linux | |
- name: Get commit message | |
id: commit_message | |
run: echo "::set-output name=message::$(git log --format='%B' -n 1)" | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
with: | |
tag_name: ${{ github.sha }} | |
release_name: Release ${{ steps.commit_message.outputs.message }} | |
body: Describe the changes in this release. | |
- name: Upload package asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: vanosilla-linux/*.deb | |
asset_name: vanosilla-linux.deb | |
asset_content_type: application/octet-stream |