From 0ce97df2a6a5edaf553368ba608ea816ca612346 Mon Sep 17 00:00:00 2001 From: Bastian Machek <16717398+bmachek@users.noreply.github.com> Date: Fri, 30 Aug 2024 09:42:24 +0200 Subject: [PATCH] New Github workflow for release copied from Min Idzelis. Renamed from .lrdevplugin to .lrplugin --- .github/workflows/release.yml | 59 ++++++++++++------ .../ExportDialogSections.lua | 0 .../ExportServiceProvider.lua | 0 .../ExportTask.lua | 0 .../ImmichAPI.lua | 0 .../Info.lua | 0 .../Init.lua | 0 .../JSON.lua | 0 .../MetadataProvider.lua | 0 .../MetadataTask.lua | 0 .../PluginInfo.lua | 0 .../PluginInfoDialogSections.lua | 0 .../PublishDialogSections.lua | 0 .../PublishServiceProvider.lua | 0 .../PublishTask.lua | 0 .../icons/logo.png | Bin .../inspect.lua | 0 .../util.lua | 0 18 files changed, 40 insertions(+), 19 deletions(-) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/ExportDialogSections.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/ExportServiceProvider.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/ExportTask.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/ImmichAPI.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/Info.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/Init.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/JSON.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/MetadataProvider.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/MetadataTask.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/PluginInfo.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/PluginInfoDialogSections.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/PublishDialogSections.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/PublishServiceProvider.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/PublishTask.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/icons/logo.png (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/inspect.lua (100%) rename {immich-plugin.lrdevplugin => immich-plugin.lrplugin}/util.lua (100%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f48991c..5a14171 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,31 +1,52 @@ +# Taken from https://github.com/midzelis/mi.Immich.Publisher/blob/main/.github/workflows/main.yml +# Many thanks to Min Idzelis + +name: Create Release + on: + workflow_dispatch: + inputs: + tag: + description: 'The next release tag to use' + required: false + type: string push: - # Sequence of patterns matched against refs/tags + branches: + - 'main' tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + - 'v*' +# Ensures that only one deploy task per branch/environment will run at a time. +concurrency: + group: environment-${{ github.ref }} + cancel-in-progress: true + jobs: build: - name: Release runs-on: ubuntu-latest permissions: contents: write + packages: write steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Build ZIP file - uses: vimtor/action-zip@v1.2 + + - name: Expose GitHub Runtime + uses: crazy-max/ghaction-github-runtime@v3 + - name: Check out the repository to the runner + uses: actions/checkout@v4 + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.2 with: - files: immich-plugin.lrdevplugin/ - dest: immich-plugin.zip - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} + custom_tag: ${{ inputs.tag }} + - name: Zip it up + run: zip -r 'immich-plugin.lrplugin.zip' immich-plugin.lrplugin -x '*.git*' + - name: Create a GitHub release + uses: ncipollo/release-action@v1 with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - body: Release ${{ github.ref }} - draft: false - prerelease: false + tag: ${{ steps.tag_version.outputs.new_tag }} + name: Release ${{ steps.tag_version.outputs.new_tag }} + body: ${{ steps.tag_version.outputs.changelog }} + removeArtifacts: true + artifacts: "immich-plugin.lrplugin.zip" + allowUpdates: true \ No newline at end of file diff --git a/immich-plugin.lrdevplugin/ExportDialogSections.lua b/immich-plugin.lrplugin/ExportDialogSections.lua similarity index 100% rename from immich-plugin.lrdevplugin/ExportDialogSections.lua rename to immich-plugin.lrplugin/ExportDialogSections.lua diff --git a/immich-plugin.lrdevplugin/ExportServiceProvider.lua b/immich-plugin.lrplugin/ExportServiceProvider.lua similarity index 100% rename from immich-plugin.lrdevplugin/ExportServiceProvider.lua rename to immich-plugin.lrplugin/ExportServiceProvider.lua diff --git a/immich-plugin.lrdevplugin/ExportTask.lua b/immich-plugin.lrplugin/ExportTask.lua similarity index 100% rename from immich-plugin.lrdevplugin/ExportTask.lua rename to immich-plugin.lrplugin/ExportTask.lua diff --git a/immich-plugin.lrdevplugin/ImmichAPI.lua b/immich-plugin.lrplugin/ImmichAPI.lua similarity index 100% rename from immich-plugin.lrdevplugin/ImmichAPI.lua rename to immich-plugin.lrplugin/ImmichAPI.lua diff --git a/immich-plugin.lrdevplugin/Info.lua b/immich-plugin.lrplugin/Info.lua similarity index 100% rename from immich-plugin.lrdevplugin/Info.lua rename to immich-plugin.lrplugin/Info.lua diff --git a/immich-plugin.lrdevplugin/Init.lua b/immich-plugin.lrplugin/Init.lua similarity index 100% rename from immich-plugin.lrdevplugin/Init.lua rename to immich-plugin.lrplugin/Init.lua diff --git a/immich-plugin.lrdevplugin/JSON.lua b/immich-plugin.lrplugin/JSON.lua similarity index 100% rename from immich-plugin.lrdevplugin/JSON.lua rename to immich-plugin.lrplugin/JSON.lua diff --git a/immich-plugin.lrdevplugin/MetadataProvider.lua b/immich-plugin.lrplugin/MetadataProvider.lua similarity index 100% rename from immich-plugin.lrdevplugin/MetadataProvider.lua rename to immich-plugin.lrplugin/MetadataProvider.lua diff --git a/immich-plugin.lrdevplugin/MetadataTask.lua b/immich-plugin.lrplugin/MetadataTask.lua similarity index 100% rename from immich-plugin.lrdevplugin/MetadataTask.lua rename to immich-plugin.lrplugin/MetadataTask.lua diff --git a/immich-plugin.lrdevplugin/PluginInfo.lua b/immich-plugin.lrplugin/PluginInfo.lua similarity index 100% rename from immich-plugin.lrdevplugin/PluginInfo.lua rename to immich-plugin.lrplugin/PluginInfo.lua diff --git a/immich-plugin.lrdevplugin/PluginInfoDialogSections.lua b/immich-plugin.lrplugin/PluginInfoDialogSections.lua similarity index 100% rename from immich-plugin.lrdevplugin/PluginInfoDialogSections.lua rename to immich-plugin.lrplugin/PluginInfoDialogSections.lua diff --git a/immich-plugin.lrdevplugin/PublishDialogSections.lua b/immich-plugin.lrplugin/PublishDialogSections.lua similarity index 100% rename from immich-plugin.lrdevplugin/PublishDialogSections.lua rename to immich-plugin.lrplugin/PublishDialogSections.lua diff --git a/immich-plugin.lrdevplugin/PublishServiceProvider.lua b/immich-plugin.lrplugin/PublishServiceProvider.lua similarity index 100% rename from immich-plugin.lrdevplugin/PublishServiceProvider.lua rename to immich-plugin.lrplugin/PublishServiceProvider.lua diff --git a/immich-plugin.lrdevplugin/PublishTask.lua b/immich-plugin.lrplugin/PublishTask.lua similarity index 100% rename from immich-plugin.lrdevplugin/PublishTask.lua rename to immich-plugin.lrplugin/PublishTask.lua diff --git a/immich-plugin.lrdevplugin/icons/logo.png b/immich-plugin.lrplugin/icons/logo.png similarity index 100% rename from immich-plugin.lrdevplugin/icons/logo.png rename to immich-plugin.lrplugin/icons/logo.png diff --git a/immich-plugin.lrdevplugin/inspect.lua b/immich-plugin.lrplugin/inspect.lua similarity index 100% rename from immich-plugin.lrdevplugin/inspect.lua rename to immich-plugin.lrplugin/inspect.lua diff --git a/immich-plugin.lrdevplugin/util.lua b/immich-plugin.lrplugin/util.lua similarity index 100% rename from immich-plugin.lrdevplugin/util.lua rename to immich-plugin.lrplugin/util.lua