install imagemagick explictly as GH actions now use ubuntu 24.04, whi… #11
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: dispatch | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'WinBox Version' | ||
required: true | ||
permissions: | ||
packages: write | ||
contents: write | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install imagemagick to add convert tool used for icon | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y imagemagick | ||
- name: Run Makefile | ||
run: make all VER=${{ github.event.inputs.version }} | ||
- name: Save Build as Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build | ||
path: | | ||
*.deb | ||
dist/ | ||
WinBox | ||
assets/ | ||
- name: Save Package as Build Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: WinBox-${{ github.event.inputs.version }}.deb | ||
path: WinBox-${{ github.event.inputs.version }}.deb | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: true | ||
prerelease: true | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./WinBox-${{ github.event.inputs.version }}.deb | ||
asset_name: WinBox-${{ github.event.inputs.version }}.deb | ||
asset_content_type: application/vnd.debian.binary-package |