Skip to content

Commit

Permalink
Use powershell to post dev build on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkanovikov committed Apr 3, 2023
1 parent 3aa9c6f commit d6cecc8
Showing 1 changed file with 36 additions and 6 deletions.
42 changes: 36 additions & 6 deletions .github/workflows/build_starc_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,25 @@ jobs:
- name: Publish artifacts to the dev stream and notify clients
if: startsWith(github.ref, 'refs/tags/') != true
shell: bash
shell: pwsh
env:
STARC_API_KEY: ${{ secrets.STARC_API_KEY }}
BUILD_VERSION: ${{env.APP_VERSION}} dev ${{env.DEV_BUILD}}
run: |
curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "name_for_file=starc-setup-64.exe" -F "file_bin=@build/windows/starc-setup-64.exe" https://starc.app/api/app/updates/publish
curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "system=windows64" -F "version=${{env.APP_VERSION}} dev ${{env.DEV_BUILD}}" https://starc.app/api/app/updates/notify
$PublishForm = @{
api_key = $env:STARC_API_KEY
name_for_file = 'starc-setup-64.exe'
#file_bin = Get-Item -Path 'build\windows\starc-setup-64.exe'
}
$PublishResult = Invoke-WebRequest -Uri 'https://starc.app/api/app/updates/publish' -Method Post -Form $PublishForm
$PublishResult
$NotifyForm = @{
api_key = $env:STARC_API_KEY
system = 'windows64'
version = $env:BUILD_VERSION
}
$NotifyResult = Invoke-WebRequest -Uri 'https://starc.app/api/app/updates/notify' -Method Post -Form $NotifyForm
$NotifyResult
- name: Publish artifacts to the GitHub releases
uses: softprops/action-gh-release@v1
Expand Down Expand Up @@ -229,10 +244,25 @@ jobs:
- name: Publish artifacts to the dev stream and notify clients
if: startsWith(github.ref, 'refs/tags/') != true
shell: bash
shell: pwsh
env:
STARC_API_KEY: ${{ secrets.STARC_API_KEY }}
BUILD_VERSION: ${{env.APP_VERSION}} dev ${{env.DEV_BUILD}}
run: |
curl -k -F "api_key=${{ secrets.STARC_API_KEY }}" -F "name_for_file=starc-setup-32.exe" -F "file_bin=@build/windows/starc-setup-32.exe" https://starc.app/api/app/updates/publish
curl -k -F "api_key=${{ secrets.STARC_API_KEY }}" -F "system=windows32" -F "version=${{env.APP_VERSION}} dev ${{env.DEV_BUILD}}" https://starc.app/api/app/updates/notify
$PublishForm = @{
api_key = $env:STARC_API_KEY
name_for_file = 'starc-setup-32.exe'
#file_bin = Get-Item -Path 'build\windows\starc-setup-32.exe'
}
$PublishResult = Invoke-WebRequest -Uri 'https://starc.app/api/app/updates/publish' -Method Post -Form $PublishForm
$PublishResult
$NotifyForm = @{
api_key = $env:STARC_API_KEY
system = 'windows32'
version = $env:BUILD_VERSION
}
$NotifyResult = Invoke-WebRequest -Uri 'https://starc.app/api/app/updates/notify' -Method Post -Form $NotifyForm
$NotifyResult
- name: Publish artifacts to GitHub releases
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit d6cecc8

Please sign in to comment.