Skip to content

Commit

Permalink
Upload all assets in upload to release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Feb 2, 2022
1 parent 53e660d commit 4e0e342
Showing 1 changed file with 65 additions and 2 deletions.
67 changes: 65 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
repository: ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: get upload url
- name: Get upload url
id: get_upload_url
run: >
url=$(echo "$response" | jq -r ".[0].upload_url")
Expand All @@ -46,7 +46,8 @@ jobs:
with:
path: package.json
prop_path: version
- name: Upload a Release Asset
# Windows
- name: Upload the windows installer asset
if: runner.os == 'Windows'
uses: actions/upload-release-asset@v1.0.2
env:
Expand All @@ -56,6 +57,68 @@ jobs:
asset_path: ./dist/authme-${{steps.version.outputs.prop}}-windows-x64-installer.exe
asset_name: authme-${{steps.version.outputs.prop}}-windows-x64-installer.exe
asset_content_type: application/octet-stream
- name: Upload the windows portable asset
if: runner.os == 'Windows'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{steps.get_upload_url.outputs.url}}
asset_path: ./dist/authme-${{steps.version.outputs.prop}}-windows-x64-portable.zip
asset_name: authme-${{steps.version.outputs.prop}}-windows-x64-portable.zip
asset_content_type: application/x-zip-compressed
- name: Upload the windows latest.yml asset
if: runner.os == 'Windows'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{steps.get_upload_url.outputs.url}}
asset_path: ./dist/latest.yml
asset_name: latest.yml
asset_content_type: application/octet-stream
# Linux
- name: Upload the linux installer asset
if: runner.os == 'Linux'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{steps.get_upload_url.outputs.url}}
asset_path: ./dist/authme-${{steps.version.outputs.prop}}-linux-x64-installer.exe
asset_name: authme-${{steps.version.outputs.prop}}-linux-x64-installer.exe
asset_content_type: application/octet-stream
- name: Upload the linux portable asset
if: runner.os == 'Linux'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{steps.get_upload_url.outputs.url}}
asset_path: ./dist/authme-${{steps.version.outputs.prop}}-linux-x64-portable.zip
asset_name: authme-${{steps.version.outputs.prop}}-linux-x64-portable.zip
asset_content_type: application/x-zip-compressed
# Mac
- name: Upload the mac installer asset
if: runner.os == 'macOS'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{steps.get_upload_url.outputs.url}}
asset_path: ./dist/authme-${{steps.version.outputs.prop}}-mac-x64-installer.exe
asset_name: authme-${{steps.version.outputs.prop}}-mac-x64-installer.exe
asset_content_type: application/octet-stream
- name: Upload the mac portable asset
if: runner.os == 'macOS'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{steps.get_upload_url.outputs.url}}
asset_path: ./dist/authme-${{steps.version.outputs.prop}}-mac-x64-portable.zip
asset_name: authme-${{steps.version.outputs.prop}}-mac-x64-portable.zip
asset_content_type: application/x-zip-compressed
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
Expand Down

0 comments on commit 4e0e342

Please sign in to comment.