53 lines
1.7 KiB
YAML
53 lines
1.7 KiB
YAML
name: Package plugin
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: "Release version/tag (defaults to the short commit SHA)"
|
|
required: false
|
|
type: string
|
|
|
|
jobs:
|
|
package:
|
|
name: Package and release
|
|
runs-on: ubuntu-latest
|
|
# Publish the release into this repo's own Releases, so the built-in
|
|
# GITHUB_TOKEN (scoped to the current repo) is sufficient — no PAT needed.
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
|
|
- name: Determine release version
|
|
id: meta
|
|
run: |
|
|
version="${{ github.event.inputs.version }}"
|
|
if [ -z "$version" ]; then
|
|
version="${GITHUB_SHA::7}"
|
|
fi
|
|
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Package
|
|
run: python3 make_release.py "${{ steps.meta.outputs.version }}"
|
|
|
|
- name: Upload
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: plugin
|
|
path: DeDRM_tools_*.zip
|
|
|
|
- name: Release
|
|
id: release
|
|
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1
|
|
with:
|
|
tag_name: ${{ steps.meta.outputs.version }}
|
|
repository: ${{ github.repository }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
name: DeDRM tools ${{ steps.meta.outputs.version }}
|
|
body: |
|
|
DeDRM tools plugin package built from commit [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}).
|
|
prerelease: false
|
|
draft: false
|
|
files: DeDRM_tools_${{ steps.meta.outputs.version }}.zip
|