mirror of
https://github.com/greenshot/greenshot
synced 2025-08-22 06:23:24 -07:00
Update tag creation
This commit is contained in:
parent
33483aa6a2
commit
cc27fc0f5f
1 changed files with 21 additions and 23 deletions
44
.github/workflows/release.yml
vendored
44
.github/workflows/release.yml
vendored
|
@ -62,26 +62,6 @@ jobs:
|
|||
Picasa_ClientId: ${{ secrets.Picasa_ClientId }}
|
||||
Picasa_ClientSecret: ${{ secrets.Picasa_ClientSecret }}
|
||||
|
||||
- name: Extract version from file name
|
||||
id: extract_version
|
||||
run: |
|
||||
$file = Get-ChildItem drop -Filter "Greenshot-INSTALLER-*.exe" | Select-Object -First 1
|
||||
if ($file -match "Greenshot-INSTALLER-([\d\.]+).*\.exe") {
|
||||
echo "VERSION=$($matches[1])" >> $GITHUB_ENV
|
||||
} else {
|
||||
throw "Version number could not be extracted from file name: $file"
|
||||
}
|
||||
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 "$VERSION" -m "Release version $VERSION"
|
||||
git push origin "$VERSION"
|
||||
|
||||
|
||||
- name: Copy Files
|
||||
run: |
|
||||
mkdir -p ${{ github.workspace }}/artifacts
|
||||
|
@ -101,19 +81,37 @@ jobs:
|
|||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: drop
|
||||
path: drop
|
||||
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 ($file -match "Greenshot-INSTALLER-([\d\.]+).*\.exe") {
|
||||
echo "version=$($matches[1])" >> $GITHUB_OUTPUT
|
||||
} else {
|
||||
throw "Version number could not be extracted from file name: $file"
|
||||
}
|
||||
shell: pwsh
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
name: "Greenshot $VERSION unstable"
|
||||
name: "Greenshot Release v${{ steps.extract_version.outputs.version }}"
|
||||
files: drop/*.exe
|
||||
draft: true
|
||||
prerelease: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- 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 "${{ steps.extract_version.outputs.version }}" -m "v${{ steps.extract_version.outputs.version }}"
|
||||
git push origin "${{ steps.extract_version.outputs.version }}"
|
||||
|
||||
|
||||
# TODOs
|
||||
# [ ] code signing (setup.iss / innosetup)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue