-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #224 from mhitza/automatic-weekly-release
Automatic weekly release
- Loading branch information
Showing
2 changed files
with
182 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
name: Build release assets | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
|
||
env: | ||
TAG_NAME: ${{ github.event.release.tag_name }} | ||
UPLOAD_URL: ${{ github.event.release.upload_url }} | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
env: | ||
QT_SELECT: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: install build dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install g++ make ccache qttools5-dev-tools libqt5xmlpatterns5-dev libqt5svg5-dev | ||
sudo apt install fuse | ||
- name: build | ||
run: | | ||
mkdir /home/runner/local | ||
qmake PREFIX=/home/runner/local Seamly2D.pro | ||
make | ||
make install | ||
- name: tar.gz package | ||
run: | | ||
tar cfz linux.tar.gz /home/runner/local | ||
- name: upload linux.tar.gz | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ env.UPLOAD_URL }} | ||
asset_path: ./linux.tar.gz | ||
asset_name: linux-build.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: AppImages | ||
run: | | ||
mkdir -p /home/runner/local/share/applications /home/runner/local/share/icons/hicolor/256x256 | ||
cp dist/seamly2d.desktop /home/runner/local/share/applications/ | ||
cp share/img/Seamly2D_logo_254x254.png /home/runner/local/share/icons/hicolor/256x256/seamly2d.png | ||
docker run --cap-add SYS_ADMIN --device /dev/fuse \ | ||
--security-opt apparmor:unconfined --security-opt seccomp=unconfined \ | ||
-v /home/runner/local:/app/usr \ | ||
--rm mhitza/linuxdeployqt:9.5.9 | ||
mv /home/runner/local/Seamly2D*.AppImage Seamly2D.AppImage | ||
cp share/img/Seamly2D_logo_254x254.png /home/runner/local/share/icons/hicolor/256x256/seamlyme.png | ||
rm /home/runner/local/share/applications/seamly2d.desktop | ||
cp dist/seamlyme.desktop /home/runner/local/share/applications | ||
docker run --cap-add SYS_ADMIN --device /dev/fuse \ | ||
--security-opt apparmor:unconfined --security-opt seccomp=unconfined \ | ||
-v /home/runner/local:/app/usr \ | ||
--rm mhitza/linuxdeployqt:9.5.9 | ||
mv /home/runner/local/SeamlyMe*.AppImage SeamlyMe.AppImage | ||
- name: upload Seamly2D.AppImage | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ env.UPLOAD_URL }} | ||
asset_path: ./Seamly2D.AppImage | ||
asset_name: Seamly2D.AppImage | ||
asset_content_type: application/octet-stream | ||
|
||
- name: upload SeamlyMe.AppImage | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ env.UPLOAD_URL }} | ||
asset_path: ./SeamlyMe.AppImage | ||
asset_name: SeamlyMe.AppImage | ||
asset_content_type: application/octet-stream | ||
|
||
macos: | ||
runs-on: macos-latest | ||
env: | ||
QT_SELECT: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: install build dependencies | ||
uses: jurplel/install-qt-action@v2 | ||
|
||
- name: build | ||
run: | | ||
qmake Seamly2D.pro | ||
make | ||
- name: dmg packages | ||
run: | | ||
hdiutil create -fs HFS+ -srcfolder src/app/seamly2d/bin/Seamly2D.app -volname "Seamly2D" Seamly2D.dmg | ||
hdiutil create -fs HFS+ -srcfolder src/app/seamlyme/bin/seamlyme.app -volname "SeamlyME" SeamlyME.dmg | ||
- name: upload Seamly2D.dmg | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ env.UPLOAD_URL }} | ||
asset_path: ./Seamly2D.dmg | ||
asset_name: Seamly2D.dmg | ||
asset_content_type: application/x-apple-diskimage | ||
|
||
- name: upload SeamlyME.dmg | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ env.UPLOAD_URL }} | ||
asset_path: ./SeamlyME.dmg | ||
asset_name: SeamlyME.dmg | ||
asset_content_type: application/x-apple-diskimage | ||
windows: | ||
runs-on: windows-latest | ||
env: | ||
QT_SELECT: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
- name: install build dependencies | ||
uses: jurplel/install-qt-action@v2 | ||
|
||
- name: build | ||
run: | | ||
qmake.exe Seamly2D.pro | ||
nmake | ||
mkdir ..\windows-build | ||
Get-ChildItem -Recurse -Include *.exe,*.dll | % { Copy-Item $_.FullName -force -destination ..\windows-build } | ||
windeployqt.exe --libdir ..\windows-build --plugindir ..\windows-build --release ..\windows-build\seamly2d.exe | ||
windeployqt.exe --force --libdir ..\windows-build --plugindir ..\windows-build --release ..\windows-build\seamlyme.exe | ||
Compress-Archive -Path ..\windows-build -DestinationPath windows-build.zip | ||
- name: upload windows.zip | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ env.UPLOAD_URL }} | ||
asset_path: ./windows-build.zip | ||
asset_name: windows.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Create weekly release | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * MON' | ||
|
||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
echo "::set-env name=TAG_NAME::weekly-`date +%Y%m%d`" | ||
echo "::set-env name=RELEASE_NAME::Weekly release `date +%Y%m%d`" | ||
- uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.TAG_NAME }} | ||
release_name: ${{ env.RELEASE_NAME }} | ||
body: This is an automated weekly release. | ||
|