Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ItEndsWithTens committed Jun 14, 2024
2 parents db0f648 + b679bcc commit b641c92
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,47 @@ jobs:
with:
name: zip

- name: Rename current release
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
shell: pwsh
run: |
$oldName = Get-Item -Path '*.zip'
$newName = $oldName.Name -replace '(.*?)-(.*)', '$1-dev-newest-$2'
Rename-Item -Path $oldName -NewName $newName
- name: Download old releases
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
shell: pwsh
run: gh release download latest --dir old_releases

- name: Prep old releases
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
shell: pwsh
working-directory: old_releases
run: |
Remove-Item -Path *oldest*
if (Test-Path *older*)
{
$oldName = Get-Item -Path *older*
$newName = $oldName.Name -replace 'older', 'oldest'
Rename-Item -Path $oldName -NewName $newName
}
if (Test-Path *newest*)
{
$oldName = Get-Item -Path *newest*
$newName = $oldName.Name -replace 'newest', 'older'
Rename-Item -Path $oldName -NewName $newName
}
Move-Item -Path *.zip -Destination ..
- name: Release latest dev build
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: crowbarmaster/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: 'latest'
title: 'Latest dev build'
body: "This rolling window release offers the 3 most recent development builds of SHME. Try 'newest' first, then 'older' or 'oldest' if something's broken. Have fun!"
prerelease: false
generate_notes: true
files: |
Expand Down

0 comments on commit b641c92

Please sign in to comment.