Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f7cc26fcd | ||
|
|
8f31e1a005 | ||
|
|
7ec649fdb0 |
@@ -1,13 +1,17 @@
|
|||||||
name: Package plugin
|
name: Package plugin
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch:
|
||||||
branches: [ master ]
|
inputs:
|
||||||
|
version:
|
||||||
|
description: "Release version/tag (defaults to the short commit SHA)"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
package:
|
package:
|
||||||
name: Package and auto-release
|
name: Package and release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# Publish the alpha release into this repo's own Releases, so the built-in
|
# 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.
|
# GITHUB_TOKEN (scoped to the current repo) is sufficient — no PAT needed.
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -15,43 +19,34 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
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
|
- name: Package
|
||||||
run: python3 make_release.py
|
run: python3 make_release.py "${{ steps.meta.outputs.version }}"
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
with:
|
with:
|
||||||
name: plugin
|
name: plugin
|
||||||
path: |
|
path: DeDRM_tools_*.zip
|
||||||
DeDRM_tools_*.zip
|
|
||||||
DeDRM_tools.zip
|
|
||||||
|
|
||||||
- name: Prepare release
|
- name: Release
|
||||||
run: cp DeDRM_tools.zip DeDRM_alpha_${{ github.sha }}.zip
|
id: release
|
||||||
|
|
||||||
- name: Delete older auto-releases
|
|
||||||
uses: dev-drprasad/delete-older-releases@dfbe6be2a006e9475dfcbe5b8d201f1824c2a9fe # v0.3.4
|
|
||||||
with:
|
|
||||||
repo: ${{ github.repository }}
|
|
||||||
keep_latest: 0
|
|
||||||
delete_tags: true
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Auto-release
|
|
||||||
id: autorelease
|
|
||||||
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1
|
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1
|
||||||
with:
|
with:
|
||||||
tag_name: autorelease_${{ github.sha }}
|
tag_name: ${{ steps.meta.outputs.version }}
|
||||||
repository: ${{ github.repository }}
|
repository: ${{ github.repository }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
name: Automatic alpha release with latest changes
|
name: DeDRM tools ${{ steps.meta.outputs.version }}
|
||||||
body: |
|
body: |
|
||||||
This release is automatically generated by Github for each commit.
|
DeDRM tools plugin package built from commit [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}).
|
||||||
|
prerelease: false
|
||||||
This means, every time a change is made to the repo, a release with an untested copy of the plugin at that stage will be created. This will contain the most up-to-date code, but it's not tested at all and may be broken.
|
|
||||||
|
|
||||||
Last update based on Git commit [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}).
|
|
||||||
prerelease: true
|
|
||||||
draft: false
|
draft: false
|
||||||
files: DeDRM_alpha_${{ github.sha }}.zip
|
files: DeDRM_tools_${{ steps.meta.outputs.version }}.zip
|
||||||
|
|||||||
Reference in New Issue
Block a user