Skip to content

Commit

Permalink
Update pre-release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
MyDrift-user authored Jun 25, 2024
1 parent f39f38c commit 229f3cb
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Pre-Release WinUtil

on:
workflow_run:
workflows: ["Compile"] # Ensure Compile winget.ps1 is done
workflows: ["Compile"] #Ensure Compile winget.ps1 is done
types:
- completed
workflow_dispatch: # Manual trigger added
Expand All @@ -15,7 +15,7 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Extract Version from winutil.ps1
id: extract_version
run: |
Expand All @@ -24,7 +24,7 @@ jobs:
if ($_ -match 'Version\s*:\s*(\d{2}\.\d{2}\.\d{2})') {
$version = $matches[1]
echo "version=$version" >> $GITHUB_ENV
echo "version=$version" >> $GITHUB_OUTPUT
echo "::set-output name=version::$version"
break
}
}
Expand All @@ -34,19 +34,12 @@ jobs:
}
shell: pwsh

- name: Draft Release Changelog
id: draft_release
uses: release-drafter/[email protected] # Using latest to support Node.js 20
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create and Upload Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.extract_version.outputs.version }}
name: Pre-Release ${{ steps.extract_version.outputs.version }}
body: ${{ steps.draft_release.outputs.draft_body }}
files: ./winutil.ps1
prerelease: true
env:
Expand Down

0 comments on commit 229f3cb

Please sign in to comment.