Skip to content

Commit

Permalink
Use Github token for release job
Browse files Browse the repository at this point in the history
  • Loading branch information
ItEndsWithTens authored Jun 14, 2024
1 parent b641c92 commit c130274
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ jobs:

runs-on: ubuntu-latest

defaults:
run:
shell: pwsh

env:
GH_TOKEN: ${{ github.token }}

steps:
- name: Download zip file
uses: actions/download-artifact@v4
Expand All @@ -158,20 +165,17 @@ jobs:

- 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*
Expand Down

0 comments on commit c130274

Please sign in to comment.