From 029a0beceb79fcc3c2f8395e947ccb91f7d3ce80 Mon Sep 17 00:00:00 2001 From: local-script Date: Fri, 16 May 2025 14:52:41 +0200 Subject: [PATCH] Comment Action for Release Deployment --- .github/workflows/release.yml | 124 ++++++++++++++++------------------ 1 file changed, 57 insertions(+), 67 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 24e37aff0..345c0cae9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,71 +66,61 @@ jobs: name: drop path: ${{ github.workspace }}/artifacts - deploy: - runs-on: windows-latest - needs: build +# deploy: +# runs-on: windows-latest +# needs: build +# +# steps: +# +# - name: Checkout repository +# uses: actions/checkout@v2 +# with: +# fetch-depth: 0 +# +# - name: Download build artifacts +# uses: actions/download-artifact@v4 +# with: +# name: drop Name of the artifact uploaded in previous steps +# path: drop Local folder where artifacts are downloaded +# +# - name: Extract version from file name +# id: extract_version +# run: | +# $file = Get-ChildItem drop -Filter "Greenshot-INSTALLER-*.exe" | Select-Object -First 1 +# if (-not $file) { +# throw "No matching file found in 'drop' directory." +# } +# if ($file.Name -match "Greenshot-INSTALLER-([\d\.]+).*\.exe") { +# echo "version=$($matches[1])" >> $Env:GITHUB_OUTPUT +# } else { +# throw "Version number could not be extracted from file name: $($file.Name)" +# } +# shell: pwsh +# +# - name: Create tag +# run: | +# git config user.name "github-actions[bot]" +# git config user.email "github-actions[bot]@users.noreply.github.com" +# git tag -a "v${{ steps.extract_version.outputs.version }}" -m "v${{ steps.extract_version.outputs.version }}" +# git push origin "v${{ steps.extract_version.outputs.version }}" +# +# - name: Create GitHub Release +# uses: softprops/action-gh-release@v2 +# with: +# name: "Greenshot ${{ steps.extract_version.outputs.version }} unstable" +# tag_name: "v${{ steps.extract_version.outputs.version }}" +# files: drop/*.exe +# generate_release_notes: true +# draft: true +# prerelease: true +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# +# - name: Trigger GitHub Pages rebuild +# shell: bash +# run: | +# curl -X POST \ +# -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ +# -H "Accept: application/vnd.github+json" \ +# https://api.github.com/repos/${{ github.repository }}/pages/builds - steps: - - - name: Checkout repository - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: drop # Name of the artifact uploaded in previous steps - path: drop # Local folder where artifacts are downloaded - - - name: Extract version from file name - id: extract_version - run: | - $file = Get-ChildItem drop -Filter "Greenshot-INSTALLER-*.exe" | Select-Object -First 1 - if (-not $file) { - throw "No matching file found in 'drop' directory." - } - if ($file.Name -match "Greenshot-INSTALLER-([\d\.]+).*\.exe") { - echo "version=$($matches[1])" >> $Env:GITHUB_OUTPUT - } else { - throw "Version number could not be extracted from file name: $($file.Name)" - } - shell: pwsh - - - name: Create tag - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git tag -a "v${{ steps.extract_version.outputs.version }}" -m "v${{ steps.extract_version.outputs.version }}" - git push origin "v${{ steps.extract_version.outputs.version }}" - - - name: Create GitHub Release - uses: softprops/action-gh-release@v2 - with: - name: "Greenshot ${{ steps.extract_version.outputs.version }} unstable" - tag_name: "v${{ steps.extract_version.outputs.version }}" - files: drop/*.exe - generate_release_notes: true - draft: true - prerelease: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Trigger GitHub Pages rebuild - shell: bash - run: | - curl -X POST \ - -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ - -H "Accept: application/vnd.github+json" \ - https://api.github.com/repos/${{ github.repository }}/pages/builds - - - -# TODOs -# [ ] code signing (setup.iss / innosetup) -# [x] name of release -# [x] version tag -# [x] change log (?) (release-drafter action) -# [x] update gh-pages automatically (?) - -