Create Release #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: Create Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Release version (e.g. v1.0.0)' | |
required: true | |
type: string | |
jobs: | |
release: | |
name: PyInstaller Create GH Release | |
# Only run if triggered manually with version | |
if: github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Download artifacts from previous build | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: pyocd-* | |
path: artifacts | |
# Rename artifacts to include version | |
- name: Rename Build Artifacts | |
run: | | |
cd artifacts | |
for artifact in pyocd-*; do | |
if [ -d "$artifact" ]; then | |
mv "$artifact" "${artifact}-${{ github.event.inputs.version }}" | |
fi | |
done | |
# Create Release | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ github.event.inputs.version }} | |
name: Release ${{ github.event.inputs.version }} | |
draft: false | |
prerelease: false | |
files: | | |
pyocd-*-${{ github.event.inputs.version }}.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |