Skip to content

Commit

Permalink
feat: add themes to release
Browse files Browse the repository at this point in the history
  • Loading branch information
JanDeDobbeleer committed Nov 1, 2020
1 parent 89503bd commit 79d9028
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -98,6 +98,52 @@ jobs:
asset_path: ${{ matrix.ARTIFACT }}.sha256
asset_name: ${{ matrix.ARTIFACT }}.sha256
asset_content_type: text/plain
themes:
needs: release
if: ${{ needs.release.outputs.skipped == 'false' }}
runs-on: ubuntu-latest
outputs:
hash_themes: ${{ steps.hash.outputs.hash_themes }}
defaults:
run:
shell: pwsh
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Zip theme files
run: |
$compress = @{
Path = "themes\*.json"
CompressionLevel = "Fastest"
DestinationPath = "themes.zip"
}
Compress-Archive @compress
- name: Hash
id: hash
run: |
$fileHash = Get-FileHash themes.zip -Algorithm SHA256
$fileHash.Hash | Out-File -Encoding 'UTF8' themes.zip.sha256
Write-Output "::set-output name=hash_${{ matrix.os }}::$($fileHash.Hash)"
- name: Upload Themes
id: upload-themes
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: themes.zip
asset_name: themes.zip
asset_content_type: application/octet-stream
- name: Upload Themes Hash
id: upload-hash-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: themes.zip.sha256
asset_name: themes.zip.sha256
asset_content_type: text/plain
powershell:
needs: [release, artifacts]
if: ${{ needs.release.outputs.skipped == 'false' }}
Expand Down

0 comments on commit 79d9028

Please sign in to comment.