github action #14
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
name: Build and Upload Debian Package | |
on: | |
push: | |
tags: | |
- '*' # This will trigger the workflow for any tag that starts with 'v': e.g. git tag 1.1.0 | |
jobs: | |
build: | |
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 build-essential debhelper dh-python python3-all | |
- name: Prepare orig.tar.gz | |
run: | | |
cd .. | |
tar czf okadminfinder_${{ github.ref_name }}.orig.tar.gz okadminfinder | |
ls -ll | |
- name: Build Debian package | |
run: | | |
dpkg-buildpackage -rfakeroot -uc -us | |
- name: Move Debian package to working directory | |
run: | | |
mv ../*.deb . | |
- name: List files in working directory | |
run: | | |
ls -ll # Verify files are present | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} # Use your secret name here | |
with: | |
tag_name: ${{ github.ref_name }} | |
release_name: "${{ github.ref_name }} Release" | |
body: "Release of version ${{ github.ref_name }}" | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: okadminfinder_${{ github.ref_name }}-1_all.deb | |
asset_name: okadminfinder_${{ github.ref_name }}-1_all.deb | |
asset_content_type: application/octet-stream |