🚀 Release #6
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 Publish .deb Package | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version of the release' | |
required: true | |
jobs: | |
build-deb: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Give execution permission to the build script | |
- name: Make build.sh executable | |
run: chmod +x ./build | |
# Run the build.sh script to build the Docker image and generate the .deb package | |
- name: Run build | |
run: ./build | |
# Find the generated .deb file in the parquetify directory | |
- name: Locate the .deb file | |
id: locate_deb | |
run: | | |
DEB_FILE=$(find ./parquetify -name "parquetify_*_amd64.deb") | |
echo "::set-output name=deb_file::$DEB_FILE" | |
# Create a release (if it doesn't exist) and capture the upload URL | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.event.inputs.version }} # Provide a version in the workflow dispatch inputs | |
release_name: Release ${{ github.event.inputs.version }} | |
draft: false | |
prerelease: false | |
# Upload the .deb package to GitHub Releases | |
- name: Upload .deb to GitHub Releases | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ steps.locate_deb.outputs.deb_file }} | |
asset_name: parquetify_${{ github.event.inputs.version }}_amd64.deb | |
asset_content_type: application/x-debian-package |