Skip to content

Commit

Permalink
Update test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cdozdil authored Jan 21, 2025
1 parent 08e58f2 commit c836d95
Showing 1 changed file with 21 additions and 29 deletions.
50 changes: 21 additions & 29 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,24 @@ jobs:
echo "Version: ${{ steps.get_version.outputs.version }}"
echo "Filename: ${{ steps.get_version.outputs.filename }}"
- name: Create Nightly Release (if not exists)
id: create_release
if: steps.check_release.outputs.release_exists == 'false'
uses: actions/github-script@v6
with:
script: |
const release = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: "nightly",
name: "Nightly Builds",
body: "This is an automated nightly build release.",
draft: false,
prerelease: true,
});
core.setOutput("release_id", release.data.id);
core.setOutput("upload_url", release.data.upload_url);
- name: Check Existing Release
id: check_release
uses: actions/github-script@v6
Expand All @@ -111,24 +129,6 @@ jobs:
}
}
- name: Create Nightly Release (if not exists)
id: create_release
if: steps.check_release.outputs.release_exists == 'false'
uses: actions/github-script@v6
with:
script: |
const release = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: "nightly",
name: "Nightly Builds",
body: "This is an automated nightly build release.",
draft: false,
prerelease: true,
});
core.setOutput("release_id", release.data.id);
core.setOutput("upload_url", release.data.upload_url);
- name: Get Commit Messages From Last Day
id: commit_messages
shell: powershell
Expand All @@ -155,19 +155,11 @@ jobs:
Write-Output "$releaseNotes"
Add-Content -Path $env:GITHUB_OUTPUT -Value "release_notes<<EOF"
Add-Content -Path $env:GITHUB_OUTPUT -Value $releaseNotes
Add-Content -Path $env:GITHUB_OUTPUT -Value "EOF"
$ReleaseTag = "nightly"
Write-Output "Updating existing release: $ReleaseTag"
gh release edit $ReleaseTag --notes "$ReleaseNotes"
- name: Debug Outputs
run: |
echo "Release notes: ${{ steps.commit_messages.outputs.release_notes }}"
- name: Update Release Notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$ReleaseTag = "nightly"
$ReleaseNotes = "${{ steps.commit_messages.outputs.release_notes }}"
Write-Output "Updating existing release: $ReleaseTag"
gh release edit $ReleaseTag --notes "$ReleaseNotes"

0 comments on commit c836d95

Please sign in to comment.