Skip to content

Commit

Permalink
draft(releases): automatic upload of artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
xnus-kernel committed Jul 3, 2023
1 parent dbf3eb9 commit e79b72f
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 31 deletions.
81 changes: 52 additions & 29 deletions .github/workflows/buildit.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,58 @@
name: BuildIt

on:
workflow_dispatch:
release:
types:
- created
- prereleased
- edited
- published

jobs:
build:
permissions: write-all
runs-on: windows-2022
steps:
- name: "Clone source"
uses: actions/checkout@v2
with:
submodules: 'true'
- name: "Setup msvc"
uses: ilammy/msvc-dev-cmd@v1
- name: "Download Qt5"
shell: bash
run: |
curl --output C:/qt5.7z -L "https://github.com/LoL-Fantome/lolcustomskin-tools/releases/download/release23/qt5.15.5-x86_64-msvc-static.7z"
7z x -oC:/ C:/qt5.7z
- name: "Build"
run: |
mkdir build
cd build
cmake -G "NMake Makefiles" "-DCMAKE_PREFIX_PATH:PATH=C:/qt5.15.5-x86_64-msvc-static" "-DCMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreaded" "-DCMAKE_BUILD_TYPE:STRING=Release" ..
cmake --build .
- name: "Package"
shell: bash
run: |
./make-release.sh build
7z a cslol-manager-windows.zip cslol-manager/
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: cslol-manager-windows
path: cslol-manager-windows.zip
retention-days: 15
- name: "Clone source"
uses: actions/checkout@v3
with:
submodules: 'true'
ref: master

- name: "Setup msvc"
uses: ilammy/msvc-dev-cmd@v1

- name: "Download Qt5"
shell: bash
run: |
curl --output C:/qt5.7z -L "https://github.com/LoL-Fantome/lolcustomskin-tools/releases/download/release23/qt5.15.5-x86_64-msvc-static.7z"
7z x -oC:/ C:/qt5.7z
- name: "Build"
run: |
mkdir build
cd build
cmake -G "NMake Makefiles" "-DCMAKE_PREFIX_PATH:PATH=C:/qt5.15.5-x86_64-msvc-static" "-DCMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreaded" "-DCMAKE_BUILD_TYPE:STRING=Release" ..
cmake --build .
- name: "Package"
shell: bash
run: |
./make-release.sh build
7z a cslol-manager-windows.zip cslol-manager/
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: cslol-manager-windows
path: cslol-manager-windows.zip
retention-days: 15

- name: 'Upload to Release'
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
with:
repo: ${{ secrets.GITHUB_TOKEN }}
file: cslol-manager-windows.zip
tag: ${{ github.ref }}
file_glob: true
26 changes: 24 additions & 2 deletions .github/workflows/builditmac.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
name: BuildItMac

on:
workflow_dispatch:
release:
types:
- created
- prereleased
- edited
- published

jobs:
build:
permissions: write-all
runs-on: macos-11
steps:
- name: "Clone source"
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: 'true'
ref: master

- name: "Download Qt5"
run: |
curl --output qt5.15.8-x86_64-macos-static.tar.xz -L "https://github.com/LeagueToolkit/cslol-manager/releases/download/release23/qt5.15.8-x86_64-macos-static.tar.xz"
tar xf qt5.15.8-x86_64-macos-static.tar.xz --strip-components 2 -C $HOME
- name: "Build"
run: |
cmake -DCMAKE_PREFIX_PATH=$HOME/qt5.15.8-x86_64-macos-static -DCMAKE_BUILD_TYPE=Release -B build -S .
cmake --build build
- name: "Package"
shell: bash
run: |
Expand All @@ -31,9 +43,19 @@ jobs:
mkdir cslol-manager-macos/cslol-manager.app/Contents/MacOS/cslol-tools
cp build/cslol-tools/mod-tools cslol-manager-macos/cslol-manager.app/Contents/MacOS/cslol-tools
tar caf cslol-manager-macos.tar.xz cslol-manager-macos/
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: cslol-manager-macos
path: cslol-manager-macos.tar.xz
retention-days: 15

- name: 'Upload to Release'
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
with:
repo: ${{ secrets.GITHUB_TOKEN }}
file: cslol-manager-macos.tar.xz
tag: ${{ github.ref }}
file_glob: true

0 comments on commit e79b72f

Please sign in to comment.