Fix auto releases

This commit is contained in:
Chris Titus 2024-04-20 18:44:54 -05:00
parent 9eceae6751
commit 57ff8b0188

View File

@ -13,17 +13,11 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
- name: Create local changes - name: Compile project
shell: pwsh shell: pwsh
run: | run: |
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process Set-ExecutionPolicy Bypass -Scope Process -Force; ./Compile.ps1
./Compile.ps1 continue-on-error: false # Directly fail the job on error, removing the need for a separate check
continue-on-error: true
- name: Check for failure in the previous step
if: failure()
run: |
echo "Compile.ps1 failed to execute properly."
exit 1
- uses: stefanzweifel/git-auto-commit-action@v5 - uses: stefanzweifel/git-auto-commit-action@v5
with: with:
commit_message: Compile Winutil commit_message: Compile Winutil
@ -35,11 +29,12 @@ jobs:
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Get current date (PowerShell) - name: Prepare Release Date
id: date run: |
run: echo "CURRENT_DATE=$(powershell (Get-Date -Format 'yyyy-MM-dd').ToString())" >> $GITHUB_ENV $date = (Get-Date).AddDays(1).ToString('yyyy-MM-dd')
echo "CURRENT_DATE=$date" >> $GITHUB_ENV
shell: pwsh
- name: Create Release and Upload Asset - name: Create Release and Upload Asset
id: create_release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
tag_name: ${{ env.CURRENT_DATE }} tag_name: ${{ env.CURRENT_DATE }}