Skip to content

Commit

Permalink
fix actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dlidstrom committed Sep 18, 2024
1 parent e6f731f commit d5ead07
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,35 +63,26 @@ jobs:
tag: ${{ env.BUILD_VERSION }}

- name: Comment pull request
uses: actions/github-script@0.3.0
uses: actions/github-script@v7
if: github.event_name == 'pull_request'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const filename = "Build/_build/TestResult.html";
const contents = fs.readFileSync(filename, "utf8");
const body = fs.readFileSync(filename, "utf8");
const { issue: { number: issue_number }, repo: { owner, repo } } = context;
github.issues.createComment({ issue_number, owner, repo, body: contents });
github.rest.issues.createComment({ issue_number, owner, repo, body });
- name: Create release
id: create_release
uses: actions/create-release@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.new_tag }}
release_name: Release v${{ steps.tag.outputs.new_tag }}
name: Release v${{ steps.tag.outputs.new_tag }}
draft: false
prerelease: ${{ github.event_name == 'pull_request' }}

- name: Upload artifact
id: upload-artifact
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: _install\${{ env.BUILD_VERSION }}.zip
asset_name: ${{ env.BUILD_VERSION }}.zip
asset_content_type: application/zip
files: |
_install/${{ env.BUILD_VERSION }}.zip

0 comments on commit d5ead07

Please sign in to comment.