Automatically upload all artifacts to releases

This commit is contained in:
Pavel Djundik committed 2024-08-26 21:47:59 +03:00
1 parent 48c00e5323
commit 653506ac14
2 files changed
+48

No files matched your search

+4
View File
@@ -12,6 +12,10 @@ trim_trailing_whitespace = true
[*.{cs, csx, vb, vbx}] [*.{cs, csx, vb, vbx}]
indent_size = 4 indent_size = 4
# Github yaml files
[*.yml]
indent_size = 2
# XML project files # XML project files
[*.{csproj, vbproj, vcxproj, vcxproj.filters, proj, projitems, shproj}] [*.{csproj, vbproj, vcxproj, vcxproj.filters, proj, projitems, shproj}]
indent_size = 2 indent_size = 2
+44
View File
@@ -126,3 +126,47 @@ jobs:
name: DepotDownloader-macos-arm64 name: DepotDownloader-macos-arm64
path: selfcontained-osx-arm64 path: selfcontained-osx-arm64
if-no-files-found: error if-no-files-found: error
release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Display artifacts folder structure
run: ls -Rl
working-directory: artifacts
- name: Create release files
run: |
set -eux
mkdir release
chmod +x artifacts/DepotDownloader-linux-x64/DepotDownloader
chmod +x artifacts/DepotDownloader-linux-arm/DepotDownloader
chmod +x artifacts/DepotDownloader-linux-arm64/DepotDownloader
chmod +x artifacts/DepotDownloader-macos-x64/DepotDownloader
chmod +x artifacts/DepotDownloader-macos-arm64/DepotDownloader
zip -9j release/DepotDownloader-framework.zip artifacts/DepotDownloader-framework/*
zip -9j release/DepotDownloader-windows-x64.zip artifacts/DepotDownloader-windows-x64/*
zip -9j release/DepotDownloader-windows-arm64.zip artifacts/DepotDownloader-windows-arm64/*
zip -9j release/DepotDownloader-linux-x64.zip artifacts/DepotDownloader-linux-x64/*
zip -9j release/DepotDownloader-linux-arm.zip artifacts/DepotDownloader-linux-arm/*
zip -9j release/DepotDownloader-linux-arm64.zip artifacts/DepotDownloader-linux-arm64/*
zip -9j release/DepotDownloader-macos-x64.zip artifacts/DepotDownloader-macos-x64/*
zip -9j release/DepotDownloader-macos-arm64.zip artifacts/DepotDownloader-macos-arm64/*
- name: Display structure of archived files
run: ls -Rl
working-directory: release
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: true
files: release/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}