mirror of
https://github.com/digarok/buckshot.git
synced 2025-02-25 23:29:05 +00:00
CICD Rewrite for all platforms
This commit is contained in:
parent
b4c7812c0d
commit
6249059e04
174
.github/workflows/release.yml
vendored
174
.github/workflows/release.yml
vendored
@ -9,56 +9,15 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
#os: [ windows-latest, ubuntu-16.04, macos-latest ]
|
||||
os: [ ubuntu-16.04 ]
|
||||
os: [ ubuntu-16.04, ubuntu-latest, macos-latest, windows-latest ]
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
- name: Make GNU
|
||||
if: matrix.os != 'windows-latest'
|
||||
working-directory: ./buckshot
|
||||
run: qmake ; make ; ls -al
|
||||
shell: bash
|
||||
- name: Make Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
working-directory: ./buckshot
|
||||
run: |
|
||||
dir
|
||||
qmake
|
||||
dir
|
||||
#mingw32-make
|
||||
#dir
|
||||
nmake
|
||||
dir
|
||||
dir release
|
||||
|
||||
- name: Package Linux Test
|
||||
if: matrix.os == 'ubuntu-16.04'
|
||||
run: |
|
||||
echo "== pwd"
|
||||
pwd
|
||||
echo "== ls -al"
|
||||
ls -al
|
||||
echo "== ls -al buckshot"
|
||||
ls -al buckshot
|
||||
echo " ++ GO TIME ++"
|
||||
./package_linux.sh
|
||||
ls -al buckshot-package-ubuntu
|
||||
|
||||
# EVERYTHING BELOW IS ONLY WHEN VERSION TAGS PUSHED (i.e. tag like "v0.1")
|
||||
# Good
|
||||
- name: Package OSX
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
./package_mac.sh
|
||||
pip3 install dmgbuild
|
||||
dmgbuild -s dmg-settings.json "buckshot" buckshot.dmg
|
||||
|
||||
# I DO NOT LIKE THIS, BUT WE CREATE THE RELEASE BEFORE BUILD IS SUCCESSFUL
|
||||
# BECAUSE OF SERIOUS LIMITATIONS IN GITHUB ACTIONS
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'ubuntu-latest'
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@ -66,25 +25,138 @@ jobs:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
|
||||
# SAVE RELEASE URL ARTIFACT SO OTHER PLATFORMS CAN FIND WHERE TO UPLOAD RELEASES
|
||||
- name: Output Release URL File
|
||||
if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'ubuntu-latest'
|
||||
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
|
||||
- name: Save release URL file for later
|
||||
if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'ubuntu-latest'
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: release_url
|
||||
path: release_url.txt
|
||||
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
- uses: jurplel/install-qt-action@v2
|
||||
|
||||
- name: Make GNU
|
||||
if: matrix.os != 'windows-latest'
|
||||
working-directory: ./buckshot
|
||||
run: |
|
||||
qmake
|
||||
make
|
||||
|
||||
# - name: Mac debug
|
||||
# if: matrix.os == 'macos-latest'
|
||||
# working-directory: ./buckshot
|
||||
# run: |
|
||||
# ls
|
||||
# ls -al buckshot.app
|
||||
# ls -al buckshot.app/Contents
|
||||
# ls -al buckshot.app/Contents/MacOS
|
||||
|
||||
- name: Prep Windows (Ico)
|
||||
if: matrix.os == 'windows-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
cp assets/icon.ico buckshot
|
||||
echo "RC_ICONS = icon.ico" >> buckshot.pro
|
||||
|
||||
|
||||
- name: Make Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
working-directory: ./buckshot
|
||||
run: |
|
||||
qmake
|
||||
nmake
|
||||
|
||||
|
||||
# PACKAGING POST BUILD
|
||||
- name: Package OSX
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
./package_mac.sh
|
||||
pip3 install dmgbuild
|
||||
dmgbuild -s dmg-settings.json "buckshot" buckshot.dmg
|
||||
|
||||
- name: Package Linux
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
run: |
|
||||
./package_linux.sh
|
||||
|
||||
- name: Package Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
working-directory: ./buckshot
|
||||
run: |
|
||||
mkdir app
|
||||
cp release\buckshot.exe app
|
||||
windeployqt app
|
||||
cp README.md app
|
||||
$url = "https://github.com/digarok/b2d/releases/download/v1.3/b2d-windows-latest-v1.3.zip"
|
||||
Invoke-WebRequest -Uri $url -OutFile b2d.zip
|
||||
7z.exe x b2d.zip
|
||||
dir
|
||||
cp b2d.exe app
|
||||
$url = "https://github.com/digarok/cadius/releases/download/0.0.0/cadius-windows-latest-0.0.0.zip"
|
||||
Invoke-WebRequest -Uri $url -OutFile cadius.zip
|
||||
7z.exe x cadius.zip
|
||||
dir
|
||||
cp build/Src/Debug/Cadius.exe app
|
||||
|
||||
7z.exe a buckshot.zip app\*
|
||||
mv buckshot.zip ..
|
||||
|
||||
|
||||
# EVERYTHING BELOW IS ONLY WHEN VERSION TAGS PUSHED (i.e. tag like "v0.1")
|
||||
|
||||
|
||||
# LOAD THE RELEASE URL FOR ALL PLATFORMS
|
||||
- name: Load Release URL from artifact
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: release_url
|
||||
- name: Set upload_url
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
shell: bash
|
||||
id: release_info
|
||||
run: |
|
||||
value=`cat release_url/release_url.txt`
|
||||
echo ::set-output name=upload_url::$value
|
||||
|
||||
# UPLOAD RELEASES
|
||||
- name: Upload Mac Release
|
||||
if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'macos-latest'
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
upload_url: ${{ steps.release_info.outputs.upload_url }}
|
||||
asset_path: ./buckshot.dmg
|
||||
asset_name: buckshot.dmg
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload Ubuntu Latest Release
|
||||
if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'ubuntu-16.04'
|
||||
if: startsWith(github.ref, 'refs/tags/v') && startsWith(matrix.os, 'ubuntu')
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
upload_url: ${{ steps.release_info.outputs.upload_url }}
|
||||
asset_path: ./buckshot-linux.zip
|
||||
asset_name: buckshot-linux.zip
|
||||
asset_name: buckshot-${{ matrix.os }}.zip
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload Windows Release
|
||||
if: startsWith(github.ref, 'refs/tags/v') && startsWith(matrix.os, 'windows')
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.release_info.outputs.upload_url }}
|
||||
asset_path: ./buckshot.zip
|
||||
asset_name: buckshot-${{ matrix.os }}.zip
|
||||
asset_content_type: application/zip
|
@ -6,4 +6,4 @@ Comment=Convert modern image formats to Apple II formats
|
||||
Terminal=false
|
||||
Categories=Utility;
|
||||
Exec=AppRun %F
|
||||
Icon=buckshot
|
||||
Icon=buckshot.png
|
||||
|
BIN
assets/icon.ico
Normal file
BIN
assets/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
4
assets/make_ico.sh
Executable file
4
assets/make_ico.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
convert icon16.png icon32.png icon256.png icon.ico
|
||||
|
@ -12,6 +12,9 @@ ID=${0##*/}
|
||||
echo "${ID}: RUN macdeployqt"
|
||||
macdeployqt $APPBUILDDIR
|
||||
|
||||
echo "${ID}: MKDIR PACKAGEDIR"
|
||||
mkdir -p $PACKAGEDIR
|
||||
|
||||
echo "${ID}: COPY APPBUILDDIR -> PACKAGEDIR"
|
||||
cp -r $APPBUILDDIR $PACKAGEDIR
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user