Skip to content

Commit

Permalink
Update publising ci scripts to work without prerelease on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fayeed committed Oct 23, 2023
1 parent d350525 commit 51630b7
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 34 deletions.
39 changes: 22 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ jobs:
asset_name: ad4m-macos-${{ steps.extract_version.outputs.version }}-x64
asset_content_type: application/octet-stream

- name: Set Version Without Prerelease
id: set_version
if: matrix.platform == 'windows-latest'
run: echo "::set-output name=version::$(echo ${{ steps.extract_version.outputs.version }} -replace '-prerelease')"

- name: Upload Release MSI Asset
id: upload-release-msi-asset
if: matrix.platform == 'windows-latest'
Expand All @@ -240,8 +245,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: D:\a\ad4m\ad4m\target\release\bundle\msi\ADAM\ Launcher_${{ steps.extract_version.outputs.version }}_x64_en-US.msi
asset_name: ADAM\ Launcher_${{ steps.extract_version.outputs.version }}_x64_en-US.msi
asset_path: D:\a\ad4m\ad4m\target\release\bundle\msi\ADAM\ Launcher_${{ steps.set_version.outputs.version }}_x64_en-US.msi
asset_name: ADAM\ Launcher_${{ steps.set_version.outputs.version }}_x64_en-US.msi
asset_content_type: application/octet-stream

- name: Upload Release MSI update Asset
Expand All @@ -252,8 +257,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: D:\a\ad4m\ad4m\target\release\bundle\msi\ADAM\ Launcher_${{ steps.extract_version.outputs.version }}_x64_en-US.msi.zip
asset_name: ADAM\ Launcher_${{ steps.extract_version.outputs.version }}_x64_en-US.msi.zip
asset_path: D:\a\ad4m\ad4m\target\release\bundle\msi\ADAM\ Launcher_${{ steps.set_version.outputs.version }}_x64_en-US.msi.zip
asset_name: ADAM\ Launcher_${{ steps.set_version.outputs.version }}_x64_en-US.msi.zip
asset_content_type: application/octet-stream

- name: Upload Release MSI update sig Asset
Expand All @@ -264,21 +269,21 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: D:\a\ad4m\ad4m\target\release\bundle\msi\ADAM\ Launcher_${{ steps.extract_version.outputs.version }}_x64_en-US.msi.zip.sig
asset_name: ADAM\ Launcher_${{ steps.extract_version.outputs.version }}_x64_en-US.msi.zip.sig
asset_path: D:\a\ad4m\ad4m\target\release\bundle\msi\ADAM\ Launcher_${{ steps.set_version.outputs.version }}_x64_en-US.msi.zip.sig
asset_name: ADAM\ Launcher_${{ steps.set_version.outputs.version }}_x64_en-US.msi.zip.sig
asset_content_type: application/octet-stream

- name: Upload Release AD4M CLI Windows Binary
id: upload-release-windows-ad4m-cli-binary
if: matrix.platform == 'windows-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: D:\a\ad4m\ad4m\target\release\ad4m-x64.exe
asset_name: ad4m-windows-${{ steps.extract_version.outputs.version }}-x64.exe
asset_content_type: application/octet-stream
# - name: Upload Release AD4M CLI Windows Binary
# id: upload-release-windows-ad4m-cli-binary
# if: matrix.platform == 'windows-latest'
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: D:\a\ad4m\ad4m\target\release\ad4m-x64.exe
# asset_name: ad4m-windows-${{ steps.extract_version.outputs.version }}-x64.exe
# asset_content_type: application/octet-stream

npm-publish:
runs-on: GH-hosted-ubuntu
Expand Down
39 changes: 22 additions & 17 deletions .github/workflows/publish_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ jobs:
asset_name: ad4m-macos-${{ steps.extract_version.outputs.version }}-x64
asset_content_type: application/octet-stream

- name: Set Version Without Prerelease
id: set_version
if: matrix.platform == 'windows-latest'
run: echo "::set-output name=version::$(echo ${{ steps.extract_version.outputs.version }} -replace '-prerelease')"

- name: Upload Release MSI Asset
id: upload-release-msi-asset
if: matrix.platform == 'windows-latest'
Expand All @@ -238,8 +243,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: 'D:\a\ad4m\ad4m\target\release\bundle\msi\ADAM Launcher_${{ steps.extract_version.outputs.version }}_x64_en-US.msi'
asset_name: ADAM\ Launcher_${{ steps.extract_version.outputs.version }}_x64_en-US.msi
asset_path: 'D:\a\ad4m\ad4m\target\release\bundle\msi\ADAM Launcher_${{ steps.set_version.outputs.version }}_x64_en-US.msi'
asset_name: ADAM\ Launcher_${{ steps.set_version.outputs.version }}_x64_en-US.msi
asset_content_type: application/octet-stream

- name: Upload Release MSI update Asset
Expand All @@ -250,8 +255,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: 'D:\a\ad4m\ad4m\target\release\bundle\msi\ADAM Launcher_${{ steps.extract_version.outputs.version }}_x64_en-US.msi.zip'
asset_name: ADAM\ Launcher_${{ steps.extract_version.outputs.version }}_x64_en-US.msi.zip
asset_path: 'D:\a\ad4m\ad4m\target\release\bundle\msi\ADAM Launcher_${{ steps.set_version.outputs.version }}_x64_en-US.msi.zip'
asset_name: ADAM\ Launcher_${{ steps.set_version.outputs.version }}_x64_en-US.msi.zip
asset_content_type: application/octet-stream

- name: Upload Release MSI update sig Asset
Expand All @@ -262,21 +267,21 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: 'D:\a\ad4m\ad4m\target\release\bundle\msi\ADAM Launcher_${{ steps.extract_version.outputs.version }}_x64_en-US.msi.zip.sig'
asset_name: ADAM\ Launcher_${{ steps.extract_version.outputs.version }}_x64_en-US.msi.zip.sig
asset_path: 'D:\a\ad4m\ad4m\target\release\bundle\msi\ADAM Launcher_${{ steps.set_version.outputs.version }}_x64_en-US.msi.zip.sig'
asset_name: ADAM\ Launcher_${{ steps.set_version.outputs.version }}_x64_en-US.msi.zip.sig
asset_content_type: application/octet-stream

- name: Upload Release AD4M CLI Windows Binary
id: upload-release-windows-ad4m-cli-binary
if: matrix.platform == 'windows-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: D:\a\ad4m\ad4m\target\release\ad4m-x64.exe
asset_name: ad4m-windows-${{ steps.extract_version.outputs.version }}-x64.exe
asset_content_type: application/octet-stream
# - name: Upload Release AD4M CLI Windows Binary
# id: upload-release-windows-ad4m-cli-binary
# if: matrix.platform == 'windows-latest'
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: D:\a\ad4m\ad4m\target\release\ad4m-x64.exe
# asset_name: ad4m-windows-${{ steps.extract_version.outputs.version }}-x64.exe
# asset_content_type: application/octet-stream

npm-publish:
runs-on: GH-hosted-ubuntu
Expand Down

0 comments on commit 51630b7

Please sign in to comment.