Skip to content

octoprint_release

octoprint_release #174

name: πŸ‘· Build Installer
on:
workflow_dispatch:
repository_dispatch:
types: [octoprint_release]
jobs:
build:
runs-on: windows-latest
steps:
- name: πŸ‘€ Get OctoPrint Version
id: octoprint_version
uses: jneilliii/github-action-get-latest-release@master
with:
repository: OctoPrint/OctoPrint
excludes: draft
token: ${{ secrets.GITHUB_TOKEN }}
- name: πŸ“Œ Checkout
uses: actions/checkout@v4
- name: πŸ”¨ Install OctoPrint into WinPython
run: |
WPy64-31050\Scripts\python.bat -m pip install OctoPrint==${{ steps.octoprint_version.outputs.release }}
shell: cmd
- name: πŸ”¨ Build Installer
run: |
"%programfiles(x86)%\Inno Setup 6\iscc.exe" /DOctoPrintVersion="${{ steps.octoprint_version.outputs.release }}" "OctoPrint Setup.iss"
shell: cmd
- name: πŸ”¨ Generate CA
id: write_file
uses: timheuer/base64-to-file@v1.2
with:
fileName: 'OctoPrintCA.crt'
encodedString: ${{ secrets.CODESIGN_CA }}
- name: πŸ’‰ Import CA
run: |
certutil -addstore "Root" "${{ steps.write_file.outputs.filePath }}"
shell: cmd
- name: ✏️ Sign Installer
uses: jneilliii/code-sign-action@master
with:
certificate: '${{ secrets.CODESIGN_BASE64 }}'
password: '${{ secrets.CODESIGN_PWD }}'
certificatesha1: '${{ secrets.CODESIGN_SHA1 }}'
cert-description: 'OctoPrint Installer by jneilliii'
folder: 'Output'
recursive: false
timestampUrl: 'http://timestamp.digicert.com'
debug: true
- name: 🧹 Delete Existing Release and Tag
run: gh release delete ${{ steps.octoprint_version.outputs.release }} --cleanup-tag
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: πŸš€ Create Release and Attach Assets
uses: softprops/action-gh-release@v2
with:
name: "OctoPrint ${{ steps.octoprint_version.outputs.release }} Setup for Windows"
tag_name: "${{ steps.octoprint_version.outputs.release }}"
body: "OctoPrint Setup created with Inno Setup using WinPython, winsw, and GitHub Actions."
fail_on_unmatched_files: true
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: ${{ steps.octoprint_version.outputs.prerelease }}
files: |
Output/OctoPrint Setup ${{ steps.octoprint_version.outputs.release }}.exe